From 428dd03f5a7291d19f0c45fc314da9356ee22d63 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 25 Jun 2014 12:27:16 -0700 Subject: Remove HP_TIMING_DIFF_INIT and dl_hp_timing_overhead Without HP_TIMING_ACCUM, dl_hp_timing_overhead is write-only. If we remove it, there's no point in HP_TIMING_DIFF_INIT either. --- sysdeps/powerpc/powerpc64/hp-timing.h | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'sysdeps/powerpc/powerpc64/hp-timing.h') diff --git a/sysdeps/powerpc/powerpc64/hp-timing.h b/sysdeps/powerpc/powerpc64/hp-timing.h index 4cad90afa1..7241b9b9d7 100644 --- a/sysdeps/powerpc/powerpc64/hp-timing.h +++ b/sysdeps/powerpc/powerpc64/hp-timing.h @@ -45,9 +45,6 @@ - HP_TIMING_NOW: place timestamp for current time in variable given as parameter. - - HP_TIMING_DIFF_INIT: do whatever is necessary to be able to use the - HP_TIMING_DIFF macro. - - HP_TIMING_DIFF: compute difference between two times and store it in a third. Source and destination might overlap. @@ -80,26 +77,6 @@ typedef unsigned long long int hp_timing_t; #define HP_TIMING_NOW(Var) __asm__ __volatile__ ("mftb %0" : "=r" (Var)) #endif -/* Use two 'mftb' instructions in a row to find out how long it takes. - On current POWER4, POWER5, and 970 processors mftb take ~10 cycles. */ -#define HP_TIMING_DIFF_INIT() \ - do { \ - if (GLRO(dl_hp_timing_overhead) == 0) \ - { \ - int __cnt = 5; \ - GLRO(dl_hp_timing_overhead) = ~0ull; \ - do \ - { \ - hp_timing_t __t1, __t2; \ - HP_TIMING_NOW (__t1); \ - HP_TIMING_NOW (__t2); \ - if (__t2 - __t1 < GLRO(dl_hp_timing_overhead)) \ - GLRO(dl_hp_timing_overhead) = __t2 - __t1; \ - } \ - while (--__cnt > 0); \ - } \ - } while (0) - /* It's simple arithmetic in 64-bit. */ #define HP_TIMING_DIFF(Diff, Start, End) (Diff) = ((End) - (Start)) -- cgit 1.4.1