Annotate pmap_changebit() as __always_inline. This function was

written as a template that when inlined is specialized for the caller
through constant value propagation and dead code elimination.  Thus,
the specialized code that is generated for pmap_clear_reference() et
al. avoids several conditional branches inside of a loop.
This commit is contained in:
alc 2003-07-23 19:49:32 +00:00
parent 2e65fb8b47
commit 7b4ab0e0b5
2 changed files with 4 additions and 2 deletions

View File

@ -206,7 +206,8 @@ static caddr_t crashdumpmap;
static PMAP_INLINE void free_pv_entry(pv_entry_t pv);
static pv_entry_t get_pv_entry(void);
static void amd64_protection_init(void);
static __inline void pmap_changebit(vm_page_t m, int bit, boolean_t setem);
static void pmap_changebit(vm_page_t m, int bit, boolean_t setem)
__always_inline;
static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva);
static void pmap_remove_page(struct pmap *pmap, vm_offset_t va);

View File

@ -240,7 +240,8 @@ static pt_entry_t *PADDR1 = 0;
static PMAP_INLINE void free_pv_entry(pv_entry_t pv);
static pv_entry_t get_pv_entry(void);
static void i386_protection_init(void);
static __inline void pmap_changebit(vm_page_t m, int bit, boolean_t setem);
static void pmap_changebit(vm_page_t m, int bit, boolean_t setem)
__always_inline;
static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva);
static void pmap_remove_page(struct pmap *pmap, vm_offset_t va);