From patchwork Thu Jul 3 04:50:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 1869 Received: (qmail 17630 invoked by alias); 3 Jul 2014 04:51:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 16672 invoked by uid 89); 3 Jul 2014 04:51:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f179.google.com X-Received: by 10.140.24.76 with SMTP id 70mr3508201qgq.30.1404363046477; Wed, 02 Jul 2014 21:50:46 -0700 (PDT) From: Richard Henderson To: libc-alpha@sourceware.org Cc: will.newton@linaro.org, marcus.shawcroft@arm.com Subject: [PATCH v2 8/8] Rely on HP_TIMING_AVAIL implies HP_SMALL_TIMING_AVAIL Date: Wed, 2 Jul 2014 21:50:26 -0700 Message-Id: <1404363026-23526-9-git-send-email-rth@twiddle.net> In-Reply-To: <1404363026-23526-1-git-send-email-rth@twiddle.net> References: <1404363026-23526-1-git-send-email-rth@twiddle.net> --- elf/dl-support.c | 8 +------- elf/rtld.c | 18 +++++------------- sysdeps/generic/ldsodefs.h | 2 +- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/elf/dl-support.c b/elf/dl-support.c index e435436..6618dcc 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 8239269..d5cace8 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 2acddaa..e01df84 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