From 7b4ab0e0b5fc8b0b717f98242cac4cfe3cbfb6dc Mon Sep 17 00:00:00 2001 From: alc Date: Wed, 23 Jul 2003 19:49:32 +0000 Subject: [PATCH] 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. --- sys/amd64/amd64/pmap.c | 3 ++- sys/i386/i386/pmap.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 9226502fa688..4faf8840b7ad 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -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); diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 6edd0e065c81..124c8a33195d 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -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);