From 8c682bb22cb4d81b6bd71caff1248c94ae19f657 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 1 Jul 2014 10:30:18 -0700 Subject: Rely on HP_TIMING_AVAIL implies HP_SMALL_TIMING_AVAIL --- elf/dl-support.c | 8 +------- elf/rtld.c | 18 +++++------------- 2 files changed, 6 insertions(+), 20 deletions(-) (limited to 'elf') diff --git a/elf/dl-support.c b/elf/dl-support.c index e435436c31..6618dcc7c3 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -129,12 +129,6 @@ void *_dl_random; /* Get architecture specific initializer. */ #include -/* We expect less than a second for relocation. */ -#ifdef HP_SMALL_TIMING_AVAIL -# undef HP_TIMING_AVAIL -# define HP_TIMING_AVAIL HP_SMALL_TIMING_AVAIL -#endif - /* Initial value of the CPU clock. */ #ifndef HP_TIMING_NONAVAIL hp_timing_t _dl_cpuclock_offset; @@ -315,7 +309,7 @@ _dl_non_dynamic_init (void) _dl_main_map.l_phdr = GL(dl_phdr); _dl_main_map.l_phnum = GL(dl_phnum); - if (HP_TIMING_AVAIL) + if (HP_SMALL_TIMING_AVAIL) HP_TIMING_NOW (_dl_cpuclock_offset); _dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1; diff --git a/elf/rtld.c b/elf/rtld.c index 8239269a9d..d5cace868b 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -195,12 +195,6 @@ static void dl_main (const ElfW(Phdr) *phdr, ElfW(Word) phnum, static struct libname_list _dl_rtld_libname; static struct libname_list _dl_rtld_libname2; -/* We expect less than a second for relocation. */ -#ifdef HP_SMALL_TIMING_AVAIL -# undef HP_TIMING_AVAIL -# define HP_TIMING_AVAIL HP_SMALL_TIMING_AVAIL -#endif - /* Variable for statistics. */ #ifndef HP_TIMING_NONAVAIL static hp_timing_t relocate_time; @@ -270,7 +264,7 @@ _dl_start_final (void *arg, struct dl_start_final_info *info) { ElfW(Addr) start_addr; - if (HP_TIMING_AVAIL) + if (HP_SMALL_TIMING_AVAIL) { /* If it hasn't happen yet record the startup time. */ if (! HP_TIMING_INLINE) @@ -302,9 +296,7 @@ _dl_start_final (void *arg, struct dl_start_final_info *info) # endif #endif -#if HP_TIMING_AVAIL HP_TIMING_NOW (GL(dl_cpuclock_offset)); -#endif /* Initialize the stack end variable. */ __libc_stack_end = __builtin_frame_address (0); @@ -317,7 +309,7 @@ _dl_start_final (void *arg, struct dl_start_final_info *info) #ifndef HP_TIMING_NONAVAIL hp_timing_t rtld_total_time; - if (HP_TIMING_AVAIL) + if (HP_SMALL_TIMING_AVAIL) { hp_timing_t end_time; @@ -359,7 +351,7 @@ _dl_start (void *arg) #define RESOLVE_MAP(sym, version, flags) (&bootstrap_map) #include "dynamic-link.h" - if (HP_TIMING_INLINE && HP_TIMING_AVAIL) + if (HP_TIMING_INLINE && HP_SMALL_TIMING_AVAIL) #ifdef DONT_USE_BOOTSTRAP_MAP HP_TIMING_NOW (start_time); #else @@ -2589,7 +2581,7 @@ print_statistics (hp_timing_t *rtld_total_timep) char *wp; /* Total time rtld used. */ - if (HP_TIMING_AVAIL) + if (HP_SMALL_TIMING_AVAIL) { HP_TIMING_PRINT (buf, sizeof (buf), *rtld_total_timep); _dl_debug_printf ("\nruntime linker statistics:\n" @@ -2657,7 +2649,7 @@ print_statistics (hp_timing_t *rtld_total_timep) #ifndef HP_TIMING_NONAVAIL /* Time spend while loading the object and the dependencies. */ - if (HP_TIMING_AVAIL) + if (HP_SMALL_TIMING_AVAIL) { char pbuf[30]; HP_TIMING_PRINT (buf, sizeof (buf), load_time); -- cgit 1.4.1