about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2014-07-01 10:30:18 -0700
committerRichard Henderson <rth@twiddle.net>2014-07-03 08:38:41 -0700
commit8c682bb22cb4d81b6bd71caff1248c94ae19f657 (patch)
tree2e18aef5b567a877056d361ab559275c1923ffd4
parent05502548e9391dd98c1688929d779d5749730369 (diff)
downloadglibc-8c682bb22cb4d81b6bd71caff1248c94ae19f657.tar.gz
glibc-8c682bb22cb4d81b6bd71caff1248c94ae19f657.tar.xz
glibc-8c682bb22cb4d81b6bd71caff1248c94ae19f657.zip
Rely on HP_TIMING_AVAIL implies HP_SMALL_TIMING_AVAIL
-rw-r--r--elf/dl-support.c8
-rw-r--r--elf/rtld.c18
-rw-r--r--sysdeps/generic/ldsodefs.h2
3 files changed, 7 insertions, 21 deletions
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 <dl-procinfo.c>
 
-/* 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);
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 2acddaa563..e01df84a99 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -319,7 +319,7 @@ struct rtld_global
   /* The object to be initialized first.  */
   EXTERN struct link_map *_dl_initfirst;
 
-#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL
+#if HP_SMALL_TIMING_AVAIL
   /* Start time on CPU clock.  */
   EXTERN hp_timing_t _dl_cpuclock_offset;
 #endif