This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.19-760-gb3ec00e


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  b3ec00e599dd7d2641bf1a575769f34a205f8e00 (commit)
       via  8c682bb22cb4d81b6bd71caff1248c94ae19f657 (commit)
       via  05502548e9391dd98c1688929d779d5749730369 (commit)
       via  4052993954d1dcb39cbd478ab59e75fe12903e9c (commit)
       via  86e1a7ff92df1589a3a0e0dd44ef2d861e307620 (commit)
       via  428dd03f5a7291d19f0c45fc314da9356ee22d63 (commit)
       via  c39323e9d2fb6697d5d8739ad9b7959c88a6d5a1 (commit)
       via  850e0e032b77ee833a9f98d1bef3f50769bdd0c7 (commit)
       via  7db48f6aab371ffce155b9ac8705673b2bf3cbbd (commit)
      from  225f410f3efe2242a9bd6dd2f9dd64728f50f7d4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b3ec00e599dd7d2641bf1a575769f34a205f8e00

commit b3ec00e599dd7d2641bf1a575769f34a205f8e00
Author: Richard Henderson <rth@twiddle.net>
Date:   Thu Jul 3 08:37:55 2014 -0700

    Changelog for last 8 patches

diff --git a/ChangeLog b/ChangeLog
index 2bb2548..9170174 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,85 @@
+2014-07-03  Richard Henderson  <rth@redhat.com>
+
+	* elf/dl-support.c (HP_TIMING_AVAIL): Do not redefine.
+	(_dl_non_dynamic_init): Check HP_SMALL_TIMING_AVAIL instead.
+	* elf/rtld.c (HP_TIMING_AVAIL): Do not redefine.
+	(_dl_start_final): Check HP_SMALL_TIMING_AVAIL instead.
+	(_dl_start, print_statistics): Likewise.
+	* sysdeps/generic/ldsodefs.h (struct rtld_global): Only check
+	HP_SMALL_TIMING_AVAIL in defining _dl_cpuclock_offset.
+
+	* sysdeps/aarch64/hp-timing.h (HP_SMALL_TIMING_AVAIL): Define.
+	* sysdeps/generic/hp-timing.h (HP_SMALL_TIMING_AVAIL): Define.
+	* sysdeps/i386/i686/hp-timing.h (HP_SMALL_TIMING_AVAIL): Define.
+	* sysdeps/ia64/hp-timing.h (HP_SMALL_TIMING_AVAIL): Define.
+	* sysdeps/powerpc/powerpc32/power4/hp-timing.h
+	(HP_SMALL_TIMING_AVAIL): Define.
+	* sysdeps/powerpc/powerpc64/hp-timing.h (HP_SMALL_TIMING_AVAIL): Define.
+	* sysdeps/sparc/sparc32/sparcv9/hp-timing.h
+	(HP_SMALL_TIMING_AVAIL): Define.
+	* sysdeps/sparc/sparc64/hp-timing.h (HP_SMALL_TIMING_AVAIL): Define.
+	* sysdeps/x86_64/hp-timing.h (HP_SMALL_TIMING_AVAIL): Define.
+
+	* sysdeps/aarch64/hp-timing.h: New file.
+
+	* sysdeps/generic/hp-timing.h: Remove dead comment.
+	* sysdeps/generic/hp-timing-common.h: New file.
+	* sysdeps/alpha/hp-timing.h: Include it.
+	(HP_TIMING_DIFF, HP_TIMING_ACCUM_NT, HP_TIMING_PRINT): Remove.
+	* sysdeps/i386/i686/hp-timing.h: Likewise.
+	* sysdeps/ia64/hp-timing.h: Likewise.
+	* sysdeps/powerpc/powerpc32/power4/hp-timing.h: Likewise.
+	* sysdeps/powerpc/powerpc64/hp-timing.h: Likewise.
+	* sysdeps/sparc/sparc32/sparcv9/hp-timing.h: Likewise.
+	* sysdeps/sparc/sparc64/hp-timing.h: Likewise.
+	* sysdeps/x86_64/hp-timing.h: Don't include the i686 version.
+	(HP_TIMING_AVAIL, HP_TIMING_INLINE): Define.
+	(hp_timing_t): New.
+
+	* benchtests/bench-string.h (_dl_hp_timing_overhead): Remove.
+	* benchtests/bench-timing.h (_dl_hp_timing_overhead): Remove.
+	(TIMING_INIT): Remove call to HP_TIMING_DIFF_INIT.
+	* elf/rtld.c (_dl_start_final): Likewise.
+	* sysdeps/generic/ldsodefs.h (_dl_hp_timing_overhead): Remove.
+	* sysdeps/alpha/hp-timing.h (HP_TIMING_DIFF_INIT): Remove.
+	* sysdeps/generic/hp-timing.h (HP_TIMING_DIFF_INIT): Remove.
+	* sysdeps/i386/i686/hp-timing.h (HP_TIMING_DIFF_INIT): Remove.
+	* sysdeps/ia64/hp-timing.h (HP_TIMING_DIFF_INIT): Remove.
+	* sysdeps/powerpc/powerpc32/power4/hp-timing.h
+	(HP_TIMING_DIFF_INIT): Remove.
+	* sysdeps/powerpc/powerpc64/hp-timing.h (HP_TIMING_DIFF_INIT): Remove.
+	* sysdeps/sparc/sparc32/sparcv9/hp-timing.h
+	(HP_TIMING_DIFF_INIT): Remove.
+	* sysdeps/sparc/sparc64/hp-timing.h (HP_TIMING_DIFF_INIT): Remove.
+	* sysdeps/i386/i686/hp-timing.c: Remove file.
+	* sysdeps/x86_64/hp-timing.c: Remove file.
+	* sysdeps/ia64/hp-timing.c: Remove file.
+	* sysdeps/powerpc/powerpc32/power4/hp-timing.c: Remove file.
+	* sysdeps/powerpc/powerpc64/hp-timing.c: Remove file.
+	* sysdeps/sparc/sparc32/sparcv9/hp-timing.c: Remove file.
+	* sysdeps/sparc/sparc64/hp-timing.c: Remove file.
+
+	* sysdeps/alpha/hp-timing.h (HP_TIMING_ACCUM): Remove.
+	* sysdeps/generic/hp-timing.h (HP_TIMING_ACCUM): Remove.
+	* sysdeps/i386/i686/hp-timing.h (HP_TIMING_ACCUM): Remove.
+	* sysdeps/ia64/hp-timing.h (HP_TIMING_ACCUM): Remove.
+	* sysdeps/powerpc/powerpc32/power4/hp-timing.h
+	(HP_TIMING_ACCUM): Remove.
+	* sysdeps/powerpc/powerpc64/hp-timing.h (HP_TIMING_ACCUM): Remove.
+	* sysdeps/sparc/sparc32/sparcv9/hp-timing.h (HP_TIMING_ACCUM): Remove.
+	* sysdeps/sparc/sparc64/hp-timing.h (HP_TIMING_ACCUM): Remove.
+
+	* sysdeps/alpha/hp-timing.h (HP_TIMING_ZERO): Remove.
+	* sysdeps/generic/hp-timing.h (HP_TIMING_ZERO): Remove.
+	* sysdeps/i386/i686/hp-timing.h (HP_TIMING_ZERO): Remove.
+	* sysdeps/ia64/hp-timing.h (HP_TIMING_ZERO): Remove.
+	* sysdeps/powerpc/powerpc32/power4/hp-timing.h (HP_TIMING_ZERO): Remove.
+	* sysdeps/powerpc/powerpc64/hp-timing.h (HP_TIMING_ZERO): Remove.
+	* sysdeps/sparc/sparc32/sparcv9/hp-timing.h (HP_TIMING_ZERO): Remove.
+	* sysdeps/sparc/sparc64/hp-timing.h (HP_TIMING_ZERO): Remove.
+
+	* sysdeps/powerpc/powerpc32/hp-timing.h: Remove file.
+
 2014-07-03  Maciej W. Rozycki  <macro@codesourcery.com>
 
 	* stdlib/tst-strtod-overflow.c (TIMEOUT): Bump up to 30.

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8c682bb22cb4d81b6bd71caff1248c94ae19f657

commit 8c682bb22cb4d81b6bd71caff1248c94ae19f657
Author: Richard Henderson <rth@twiddle.net>
Date:   Tue Jul 1 10:30:18 2014 -0700

    Rely on HP_TIMING_AVAIL implies HP_SMALL_TIMING_AVAIL

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 <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 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

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=05502548e9391dd98c1688929d779d5749730369

commit 05502548e9391dd98c1688929d779d5749730369
Author: Richard Henderson <rth@twiddle.net>
Date:   Tue Jul 1 10:20:14 2014 -0700

    Always provide HP_SMALL_TIMING_AVAIL

diff --git a/sysdeps/aarch64/hp-timing.h b/sysdeps/aarch64/hp-timing.h
index 4267d2c..5e2888c 100644
--- a/sysdeps/aarch64/hp-timing.h
+++ b/sysdeps/aarch64/hp-timing.h
@@ -21,6 +21,7 @@
 
 /* We always assume having the cycle counter register.  */
 #define HP_TIMING_AVAIL		(1)
+#define HP_SMALL_TIMING_AVAIL	(1)
 
 /* We indeed have inlined functions.  */
 #define HP_TIMING_INLINE	(1)
diff --git a/sysdeps/generic/hp-timing.h b/sysdeps/generic/hp-timing.h
index 95c051d..99f3456 100644
--- a/sysdeps/generic/hp-timing.h
+++ b/sysdeps/generic/hp-timing.h
@@ -26,6 +26,7 @@
 
 /* Provide dummy definitions.  */
 #define HP_TIMING_AVAIL		(0)
+#define HP_SMALL_TIMING_AVAIL	(0)
 #define HP_TIMING_INLINE	(0)
 typedef int hp_timing_t;
 #define HP_TIMING_NOW(var)
diff --git a/sysdeps/i386/i686/hp-timing.h b/sysdeps/i386/i686/hp-timing.h
index 512efc5..296a839 100644
--- a/sysdeps/i386/i686/hp-timing.h
+++ b/sysdeps/i386/i686/hp-timing.h
@@ -22,6 +22,7 @@
 
 /* We always assume having the timestamp register.  */
 #define HP_TIMING_AVAIL		(1)
+#define HP_SMALL_TIMING_AVAIL	(1)
 
 /* We indeed have inlined functions.  */
 #define HP_TIMING_INLINE	(1)
diff --git a/sysdeps/ia64/hp-timing.h b/sysdeps/ia64/hp-timing.h
index 3d441ff..8f19b41 100644
--- a/sysdeps/ia64/hp-timing.h
+++ b/sysdeps/ia64/hp-timing.h
@@ -22,6 +22,7 @@
 
 /* We always assume having the timestamp register.  */
 #define HP_TIMING_AVAIL		(1)
+#define HP_SMALL_TIMING_AVAIL	(1)
 
 /* We indeed have inlined functions.  */
 #define HP_TIMING_INLINE	(1)
diff --git a/sysdeps/powerpc/powerpc32/power4/hp-timing.h b/sysdeps/powerpc/powerpc32/power4/hp-timing.h
index f5237e3..76557df 100644
--- a/sysdeps/powerpc/powerpc32/power4/hp-timing.h
+++ b/sysdeps/powerpc/powerpc32/power4/hp-timing.h
@@ -22,6 +22,7 @@
 
 /* We always assume having the timestamp register.  */
 #define HP_TIMING_AVAIL		(1)
+#define HP_SMALL_TIMING_AVAIL	(1)
 
 /* We indeed have inlined functions.  */
 #define HP_TIMING_INLINE	(1)
diff --git a/sysdeps/powerpc/powerpc64/hp-timing.h b/sysdeps/powerpc/powerpc64/hp-timing.h
index d4fcb3d..028da9d 100644
--- a/sysdeps/powerpc/powerpc64/hp-timing.h
+++ b/sysdeps/powerpc/powerpc64/hp-timing.h
@@ -22,6 +22,7 @@
 
 /* We always assume having the timestamp register.  */
 #define HP_TIMING_AVAIL		(1)
+#define HP_SMALL_TIMING_AVAIL	(1)
 
 /* We indeed have inlined functions.  */
 #define HP_TIMING_INLINE	(1)
diff --git a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
index 4d9188f..a1f083d 100644
--- a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
+++ b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
@@ -21,6 +21,7 @@
 #define _HP_TIMING_H	1
 
 #define HP_TIMING_AVAIL		(1)
+#define HP_SMALL_TIMING_AVAIL	(1)
 #define HP_TIMING_INLINE	(1)
 
 typedef unsigned long long int hp_timing_t;
diff --git a/sysdeps/sparc/sparc64/hp-timing.h b/sysdeps/sparc/sparc64/hp-timing.h
index ea3ba9b..62da8bc 100644
--- a/sysdeps/sparc/sparc64/hp-timing.h
+++ b/sysdeps/sparc/sparc64/hp-timing.h
@@ -21,6 +21,7 @@
 #define _HP_TIMING_H	1
 
 #define HP_TIMING_AVAIL		(1)
+#define HP_SMALL_TIMING_AVAIL	(1)
 #define HP_TIMING_INLINE	(1)
 
 typedef unsigned long int hp_timing_t;
diff --git a/sysdeps/x86_64/hp-timing.h b/sysdeps/x86_64/hp-timing.h
index 89501fc..2d71f70 100644
--- a/sysdeps/x86_64/hp-timing.h
+++ b/sysdeps/x86_64/hp-timing.h
@@ -21,6 +21,7 @@
 
 /* We always assume having the timestamp register.  */
 #define HP_TIMING_AVAIL		(1)
+#define HP_SMALL_TIMING_AVAIL	(1)
 
 /* We indeed have inlined functions.  */
 #define HP_TIMING_INLINE	(1)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4052993954d1dcb39cbd478ab59e75fe12903e9c

commit 4052993954d1dcb39cbd478ab59e75fe12903e9c
Author: Richard Henderson <rth@twiddle.net>
Date:   Wed Jun 25 14:02:39 2014 -0700

    aarch64: Add hp-timing.h

diff --git a/sysdeps/aarch64/hp-timing.h b/sysdeps/aarch64/hp-timing.h
new file mode 100644
index 0000000..4267d2c
--- /dev/null
+++ b/sysdeps/aarch64/hp-timing.h
@@ -0,0 +1,37 @@
+/* High precision, low overhead timing functions.  AArch64 version.
+   Copyright (C) 2014 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef _HP_TIMING_H
+#define _HP_TIMING_H	1
+
+/* We always assume having the cycle counter register.  */
+#define HP_TIMING_AVAIL		(1)
+
+/* We indeed have inlined functions.  */
+#define HP_TIMING_INLINE	(1)
+
+/* We use 64bit values for the times.  */
+typedef unsigned long long int hp_timing_t;
+
+/* Sync the instruction stream, and read from the virtual cycle counter.  */
+#define HP_TIMING_NOW(Var) \
+  __asm__ __volatile__ ("isb; mrs %0, cntvct_el0" : "=r" (Var))
+
+#include <hp-timing-common.h>
+
+#endif	/* hp-timing.h */

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=86e1a7ff92df1589a3a0e0dd44ef2d861e307620

commit 86e1a7ff92df1589a3a0e0dd44ef2d861e307620
Author: Richard Henderson <rth@twiddle.net>
Date:   Wed Jun 25 13:58:59 2014 -0700

    Unify hp-timing implementations
    
    Provide an hp-timing-common.h for ports to use.

diff --git a/sysdeps/alpha/hp-timing.h b/sysdeps/alpha/hp-timing.h
index 9745e53..26a0287 100644
--- a/sysdeps/alpha/hp-timing.h
+++ b/sysdeps/alpha/hp-timing.h
@@ -20,42 +20,6 @@
 #ifndef _HP_TIMING_H
 #define _HP_TIMING_H	1
 
-#include <string.h>
-#include <sys/param.h>
-#include <_itoa.h>
-
-/* The macros defined here use the timestamp counter in IA-64.  They
-   provide a very accurate way to measure the time with very little
-   overhead.  The time values themself have no real meaning, only
-   differences are interesting.
-
-   The list of macros we need includes the following:
-
-   - HP_TIMING_AVAIL: test for availability.
-
-   - HP_TIMING_INLINE: this macro is non-zero if the functionality is not
-     implemented using function calls but instead uses some inlined code
-     which might simply consist of a few assembler instructions.  We have to
-     know this since we might want to use the macros here in places where we
-     cannot make function calls.
-
-   - hp_timing_t: This is the type for variables used to store the time
-     values.
-
-   - HP_TIMING_NOW: place timestamp for current time in variable given as
-     parameter.
-
-   - HP_TIMING_DIFF: compute difference between two times and store it
-     in a third.  Source and destination might overlap.
-
-   - HP_TIMING_ACCUM_NT: add time difference to another variable, without
-     being thread-safe.
-
-   - HP_TIMING_PRINT: write decimal representation of the timing value into
-     the given string.  This operation need not be inline even though
-     HP_TIMING_INLINE is specified.
-*/
-
 /* We always have the timestamp register, but it's got only a 4 second
    range.  Use it for ld.so profiling only.  */
 #define HP_TIMING_AVAIL		(0)
@@ -77,21 +41,6 @@ typedef unsigned int hp_timing_t;
     (VAR) = (int) (x_) - (int) (x_ >> 32);				      \
   } while (0)
 
-/* It's simple arithmetic for us.  */
-#define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
-
-#define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
-
-/* Print the time value.  */
-#define HP_TIMING_PRINT(Buf, Len, Val) \
-  do {									      \
-    char __buf[20];							      \
-    char *__cp = _itoa_word (Val, __buf + sizeof (__buf), 10, 0);	      \
-    int __len = (Len);							      \
-    char *__dest = (Buf);						      \
-    while (__len-- > 0 && __cp < __buf + sizeof (__buf))		      \
-      *__dest++ = *__cp++;						      \
-    memcpy (__dest, " clock cycles", MIN (__len, sizeof (" clock cycles")));  \
-  } while (0)
+#include <hp-timing-common.h>
 
 #endif	/* hp-timing.h */
diff --git a/sysdeps/generic/hp-timing.h b/sysdeps/generic/hp-timing-common.h
similarity index 57%
copy from sysdeps/generic/hp-timing.h
copy to sysdeps/generic/hp-timing-common.h
index 49ddb91..1d7e95e 100644
--- a/sysdeps/generic/hp-timing.h
+++ b/sysdeps/generic/hp-timing-common.h
@@ -17,15 +17,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifndef _HP_TIMING_H
-#define _HP_TIMING_H	1
-
-
-/* There are no generic definitions for the times.  We could write something
-   using the `gettimeofday' system call where available but the overhead of
-   the system call might be too high.
-
-   In case a platform supports timers in the hardware the following macros
+/* In case a platform supports timers in the hardware the following macros
    and types must be defined:
 
    - HP_TIMING_AVAIL: test for availability.
@@ -37,33 +29,34 @@
      cannot make function calls.
 
    - hp_timing_t: This is the type for variables used to store the time
-     values.
+     values.  This type must be integral.
 
    - HP_TIMING_NOW: place timestamp for current time in variable given as
      parameter.
-
-   - HP_TIMING_DIFF: compute difference between two times and store it
-     in a third.  Source and destination might overlap.
-
-   - HP_TIMING_ACCUM_NT: add time difference to another variable, without
-     being thread-safe.
-
-   - HP_TIMING_PRINT: write decimal representation of the timing value into
-     the given string.  This operation need not be inline even though
-     HP_TIMING_INLINE is specified.
-
 */
 
-/* Provide dummy definitions.  */
-#define HP_TIMING_AVAIL		(0)
-#define HP_TIMING_INLINE	(0)
-typedef int hp_timing_t;
-#define HP_TIMING_NOW(var)
-#define HP_TIMING_DIFF(Diff, Start, End)
-#define HP_TIMING_ACCUM_NT(Sum, Diff)
-#define HP_TIMING_PRINT(Buf, Len, Val)
-
-/* Since this implementation is not available we tell the user about it.  */
-#define HP_TIMING_NONAVAIL	1
-
-#endif	/* hp-timing.h */
+/* The target supports hp-timing.  Share the common infrastructure.  */
+
+#include <string.h>
+#include <sys/param.h>
+#include <_itoa.h>
+
+/* Compute the difference between START and END, storing into DIFF.  */
+#define HP_TIMING_DIFF(Diff, Start, End)	((Diff) = (End) - (Start))
+
+/* Accumulate ADD into SUM.  No attempt is made to be thread-safe.  */
+#define HP_TIMING_ACCUM_NT(Sum, Diff)		((Sum) += (Diff))
+
+/* Write a decimal representation of the timing value into the given string.  */
+#define HP_TIMING_PRINT(Dest, Len, Val) 				\
+  do {									\
+    char __buf[20];							\
+    char *__dest = (Dest);						\
+    size_t __len = (Len);						\
+    char *__cp = _itoa ((Val), __buf + sizeof (__buf), 10, 0);		\
+    size_t __cp_len = MIN (__buf + sizeof (__buf) - __cp, __len);	\
+    memcpy (__dest, __cp, __cp_len);					\
+    memcpy (__dest + __cp_len, " cycles",				\
+	    MIN (__len - __cp_len, sizeof (" cycles")));		\
+    __dest[__len - 1] = '\0';						\
+  } while (0)
diff --git a/sysdeps/generic/hp-timing.h b/sysdeps/generic/hp-timing.h
index 49ddb91..95c051d 100644
--- a/sysdeps/generic/hp-timing.h
+++ b/sysdeps/generic/hp-timing.h
@@ -20,39 +20,9 @@
 #ifndef _HP_TIMING_H
 #define _HP_TIMING_H	1
 
-
 /* There are no generic definitions for the times.  We could write something
    using the `gettimeofday' system call where available but the overhead of
-   the system call might be too high.
-
-   In case a platform supports timers in the hardware the following macros
-   and types must be defined:
-
-   - HP_TIMING_AVAIL: test for availability.
-
-   - HP_TIMING_INLINE: this macro is non-zero if the functionality is not
-     implemented using function calls but instead uses some inlined code
-     which might simply consist of a few assembler instructions.  We have to
-     know this since we might want to use the macros here in places where we
-     cannot make function calls.
-
-   - hp_timing_t: This is the type for variables used to store the time
-     values.
-
-   - HP_TIMING_NOW: place timestamp for current time in variable given as
-     parameter.
-
-   - HP_TIMING_DIFF: compute difference between two times and store it
-     in a third.  Source and destination might overlap.
-
-   - HP_TIMING_ACCUM_NT: add time difference to another variable, without
-     being thread-safe.
-
-   - HP_TIMING_PRINT: write decimal representation of the timing value into
-     the given string.  This operation need not be inline even though
-     HP_TIMING_INLINE is specified.
-
-*/
+   the system call might be too high.  */
 
 /* Provide dummy definitions.  */
 #define HP_TIMING_AVAIL		(0)
diff --git a/sysdeps/i386/i686/hp-timing.h b/sysdeps/i386/i686/hp-timing.h
index 12c613e..512efc5 100644
--- a/sysdeps/i386/i686/hp-timing.h
+++ b/sysdeps/i386/i686/hp-timing.h
@@ -20,50 +20,6 @@
 #ifndef _HP_TIMING_H
 #define _HP_TIMING_H	1
 
-#include <string.h>
-#include <sys/param.h>
-#include <_itoa.h>
-
-/* The macros defined here use the timestamp counter in i586 and up versions
-   of the x86 processors.  They provide a very accurate way to measure the
-   time with very little overhead.  The time values themself have no real
-   meaning, only differences are interesting.
-
-   This version is for the i686 processors.  The difference to the i586
-   version is that the timerstamp register is unconditionally used.  This is
-   not the case for the i586 version where we have to perform runtime test
-   whether the processor really has this capability.  We have to make this
-   distinction since the sysdeps/i386/i586 code is supposed to work on all
-   platforms while the i686 already contains i686-specific code.
-
-   The list of macros we need includes the following:
-
-   - HP_TIMING_AVAIL: test for availability.
-
-   - HP_TIMING_INLINE: this macro is non-zero if the functionality is not
-     implemented using function calls but instead uses some inlined code
-     which might simply consist of a few assembler instructions.  We have to
-     know this since we might want to use the macros here in places where we
-     cannot make function calls.
-
-   - hp_timing_t: This is the type for variables used to store the time
-     values.
-
-   - HP_TIMING_NOW: place timestamp for current time in variable given as
-     parameter.
-
-   - HP_TIMING_DIFF: compute difference between two times and store it
-     in a third.  Source and destination might overlap.
-
-   - HP_TIMING_ACCUM_NT: add time difference to another variable, without
-     being thread-safe.
-
-   - HP_TIMING_PRINT: write decimal representation of the timing value into
-     the given string.  This operation need not be inline even though
-     HP_TIMING_INLINE is specified.
-
-*/
-
 /* We always assume having the timestamp register.  */
 #define HP_TIMING_AVAIL		(1)
 
@@ -80,21 +36,6 @@ typedef unsigned long long int hp_timing_t;
    in accurate clock cycles here so we don't do this.  */
 #define HP_TIMING_NOW(Var)	__asm__ __volatile__ ("rdtsc" : "=A" (Var))
 
-/* It's simple arithmetic for us.  */
-#define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
-
-#define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
-
-/* Print the time value.  */
-#define HP_TIMING_PRINT(Buf, Len, Val) \
-  do {									      \
-    char __buf[20];							      \
-    char *__cp = _itoa (Val, __buf + sizeof (__buf), 10, 0);		      \
-    size_t __len = (Len);						      \
-    char *__dest = (Buf);						      \
-    while (__len-- > 0 && __cp < __buf + sizeof (__buf))		      \
-      *__dest++ = *__cp++;						      \
-    memcpy (__dest, " clock cycles", MIN (__len, sizeof (" clock cycles")));  \
-  } while (0)
+#include <hp-timing-common.h>
 
 #endif	/* hp-timing.h */
diff --git a/sysdeps/ia64/hp-timing.h b/sysdeps/ia64/hp-timing.h
index 6b49ffc..3d441ff 100644
--- a/sysdeps/ia64/hp-timing.h
+++ b/sysdeps/ia64/hp-timing.h
@@ -20,44 +20,6 @@
 #ifndef _HP_TIMING_H
 #define _HP_TIMING_H	1
 
-#include <string.h>
-#include <sys/param.h>
-#include <_itoa.h>
-#include <ia64intrin.h>
-
-/* The macros defined here use the timestamp counter in IA-64.  They
-   provide a very accurate way to measure the time with very little
-   overhead.  The time values themself have no real meaning, only
-   differences are interesting.
-
-   The list of macros we need includes the following:
-
-   - HP_TIMING_AVAIL: test for availability.
-
-   - HP_TIMING_INLINE: this macro is non-zero if the functionality is not
-     implemented using function calls but instead uses some inlined code
-     which might simply consist of a few assembler instructions.  We have to
-     know this since we might want to use the macros here in places where we
-     cannot make function calls.
-
-   - hp_timing_t: This is the type for variables used to store the time
-     values.
-
-   - HP_TIMING_NOW: place timestamp for current time in variable given as
-     parameter.
-
-   - HP_TIMING_DIFF: compute difference between two times and store it
-     in a third.  Source and destination might overlap.
-
-   - HP_TIMING_ACCUM_NT: add time difference to another variable, without
-     being thread-safe.
-
-   - HP_TIMING_PRINT: write decimal representation of the timing value into
-     the given string.  This operation need not be inline even though
-     HP_TIMING_INLINE is specified.
-
-*/
-
 /* We always assume having the timestamp register.  */
 #define HP_TIMING_AVAIL		(1)
 
@@ -81,22 +43,6 @@ typedef unsigned long int hp_timing_t;
      while (REPEAT_READ (__itc));					      \
      Var = __itc; })
 
-/* It's simple arithmetic for us.  */
-#define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
-
-#define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
-
-/* Print the time value.  */
-#define HP_TIMING_PRINT(Buf, Len, Val) \
-  do {									      \
-    char __buf[20];							      \
-    char *__cp = _itoa_word (Val, __buf + sizeof (__buf), 10, 0);	      \
-    int __len = (Len);							      \
-    char *__dest = (Buf);						      \
-    while (__len-- > 0 && __cp < __buf + sizeof (__buf))		      \
-      *__dest++ = *__cp++;						      \
-    memcpy (__dest, " clock cycles", MIN (__len,			      \
-					  (int) sizeof (" clock cycles")));   \
-  } while (0)
+#include <hp-timing-common.h>
 
 #endif	/* hp-timing.h */
diff --git a/sysdeps/powerpc/powerpc32/power4/hp-timing.h b/sysdeps/powerpc/powerpc32/power4/hp-timing.h
index 702efac..f5237e3 100644
--- a/sysdeps/powerpc/powerpc32/power4/hp-timing.h
+++ b/sysdeps/powerpc/powerpc32/power4/hp-timing.h
@@ -20,43 +20,6 @@
 #ifndef _HP_TIMING_H
 #define _HP_TIMING_H	1
 
-#include <string.h>
-#include <sys/param.h>
-#include <_itoa.h>
-#include <atomic.h>
-
-/* The macros defined here use the powerpc 64-bit time base register.
-   The time base is nominally clocked at 1/8th the CPU clock, but this
-   can vary.
-
-   The list of macros we need includes the following:
-
-   - HP_TIMING_AVAIL: test for availability.
-
-   - HP_TIMING_INLINE: this macro is non-zero if the functionality is not
-     implemented using function calls but instead uses some inlined code
-     which might simply consist of a few assembler instructions.  We have to
-     know this since we might want to use the macros here in places where we
-     cannot make function calls.
-
-   - hp_timing_t: This is the type for variables used to store the time
-     values.
-
-   - HP_TIMING_NOW: place timestamp for current time in variable given as
-     parameter.
-
-   - HP_TIMING_DIFF: compute difference between two times and store it
-     in a third.  Source and destination might overlap.
-
-   - HP_TIMING_ACCUM_NT: add time difference to another variable, without
-     being thread-safe.
-
-   - HP_TIMING_PRINT: write decimal representation of the timing value into
-     the given string.  This operation need not be inline even though
-     HP_TIMING_INLINE is specified.
-
-*/
-
 /* We always assume having the timestamp register.  */
 #define HP_TIMING_AVAIL		(1)
 
@@ -85,21 +48,6 @@ typedef unsigned long long int hp_timing_t;
     Var = ((hp_timing_t) hi << 32) | lo;				\
   } while (0)
 
-/* It's simple arithmetic in 64-bit.  */
-#define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
-
-#define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
-
-/* Print the time value.  */
-#define HP_TIMING_PRINT(Buf, Len, Val) \
-  do {									      \
-    char __buf[20];							      \
-    char *__cp = _itoa (Val, __buf + sizeof (__buf), 10, 0);		      \
-    size_t __len = (Len);						      \
-    char *__dest = (Buf);						      \
-    while (__len-- > 0 && __cp < __buf + sizeof (__buf))		      \
-      *__dest++ = *__cp++;						      \
-    memcpy (__dest, " ticks", MIN (__len, sizeof (" ticks")));  \
-  } while (0)
+#include <hp-timing-common.h>
 
 #endif	/* hp-timing.h */
diff --git a/sysdeps/powerpc/powerpc64/hp-timing.h b/sysdeps/powerpc/powerpc64/hp-timing.h
index 7241b9b..d4fcb3d 100644
--- a/sysdeps/powerpc/powerpc64/hp-timing.h
+++ b/sysdeps/powerpc/powerpc64/hp-timing.h
@@ -20,43 +20,6 @@
 #ifndef _HP_TIMING_H
 #define _HP_TIMING_H	1
 
-#include <string.h>
-#include <sys/param.h>
-#include <_itoa.h>
-#include <atomic.h>
-
-/* The macros defined here use the powerpc 64-bit time base register.
-   The time base is nominally clocked at 1/8th the CPU clock, but this
-   can vary.
-
-   The list of macros we need includes the following:
-
-   - HP_TIMING_AVAIL: test for availability.
-
-   - HP_TIMING_INLINE: this macro is non-zero if the functionality is not
-     implemented using function calls but instead uses some inlined code
-     which might simply consist of a few assembler instructions.  We have to
-     know this since we might want to use the macros here in places where we
-     cannot make function calls.
-
-   - hp_timing_t: This is the type for variables used to store the time
-     values.
-
-   - HP_TIMING_NOW: place timestamp for current time in variable given as
-     parameter.
-
-   - HP_TIMING_DIFF: compute difference between two times and store it
-     in a third.  Source and destination might overlap.
-
-   - HP_TIMING_ACCUM_NT: add time difference to another variable, without
-     being thread-safe.
-
-   - HP_TIMING_PRINT: write decimal representation of the timing value into
-     the given string.  This operation need not be inline even though
-     HP_TIMING_INLINE is specified.
-
-*/
-
 /* We always assume having the timestamp register.  */
 #define HP_TIMING_AVAIL		(1)
 
@@ -77,21 +40,6 @@ typedef unsigned long long int hp_timing_t;
 #define HP_TIMING_NOW(Var)	__asm__ __volatile__ ("mftb %0" : "=r" (Var))
 #endif
 
-/* It's simple arithmetic in 64-bit.  */
-#define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
-
-#define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
-
-/* Print the time value.  */
-#define HP_TIMING_PRINT(Buf, Len, Val) \
-  do {									      \
-    char __buf[20];							      \
-    char *__cp = _itoa (Val, __buf + sizeof (__buf), 10, 0);		      \
-    size_t __len = (Len);						      \
-    char *__dest = (Buf);						      \
-    while (__len-- > 0 && __cp < __buf + sizeof (__buf))		      \
-      *__dest++ = *__cp++;						      \
-    memcpy (__dest, " ticks", MIN (__len, sizeof (" ticks")));  \
-  } while (0)
+#include <hp-timing-common.h>
 
 #endif	/* hp-timing.h */
diff --git a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
index 3f63ce6..4d9188f 100644
--- a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
+++ b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
@@ -20,10 +20,6 @@
 #ifndef _HP_TIMING_H
 #define _HP_TIMING_H	1
 
-#include <string.h>
-#include <sys/param.h>
-#include <_itoa.h>
-
 #define HP_TIMING_AVAIL		(1)
 #define HP_TIMING_INLINE	(1)
 
@@ -34,19 +30,6 @@ typedef unsigned long long int hp_timing_t;
 			    "srlx %L0, 32, %H0" \
 			    : "=r" (Var))
 
-#define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
-
-#define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
-
-#define HP_TIMING_PRINT(Buf, Len, Val) \
-  do {									      \
-    char __buf[20];							      \
-    char *__cp = _itoa (Val, __buf + sizeof (__buf), 10, 0);		      \
-    int __len = (Len);							      \
-    char *__dest = (Buf);						      \
-    while (__len-- > 0 && __cp < __buf + sizeof (__buf))		      \
-      *__dest++ = *__cp++;						      \
-    memcpy (__dest, " clock cycles", MIN (__len, sizeof (" clock cycles")));  \
-  } while (0)
+#include <hp-timing-common.h>
 
 #endif	/* hp-timing.h */
diff --git a/sysdeps/sparc/sparc64/hp-timing.h b/sysdeps/sparc/sparc64/hp-timing.h
index 521f64e..ea3ba9b 100644
--- a/sysdeps/sparc/sparc64/hp-timing.h
+++ b/sysdeps/sparc/sparc64/hp-timing.h
@@ -20,10 +20,6 @@
 #ifndef _HP_TIMING_H
 #define _HP_TIMING_H	1
 
-#include <string.h>
-#include <sys/param.h>
-#include <_itoa.h>
-
 #define HP_TIMING_AVAIL		(1)
 #define HP_TIMING_INLINE	(1)
 
@@ -31,19 +27,6 @@ typedef unsigned long int hp_timing_t;
 
 #define HP_TIMING_NOW(Var) __asm__ __volatile__ ("rd %%tick, %0" : "=r" (Var))
 
-#define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
-
-#define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
-
-#define HP_TIMING_PRINT(Buf, Len, Val) \
-  do {									      \
-    char __buf[20];							      \
-    char *__cp = _itoa (Val, __buf + sizeof (__buf), 10, 0);		      \
-    int __len = (Len);							      \
-    char *__dest = (Buf);						      \
-    while (__len-- > 0 && __cp < __buf + sizeof (__buf))		      \
-      *__dest++ = *__cp++;						      \
-    memcpy (__dest, " clock cycles", MIN (__len, sizeof (" clock cycles")));  \
-  } while (0)
+#include <hp-timing-common.h>
 
 #endif	/* hp-timing.h */
diff --git a/sysdeps/x86_64/hp-timing.h b/sysdeps/x86_64/hp-timing.h
index e132dac..89501fc 100644
--- a/sysdeps/x86_64/hp-timing.h
+++ b/sysdeps/x86_64/hp-timing.h
@@ -17,15 +17,23 @@
    <http://www.gnu.org/licenses/>.  */
 
 #ifndef _HP_TIMING_H
+#define _HP_TIMING_H	1
 
-/* We can use some of the i686 implementation without changes.  */
-# include <sysdeps/i386/i686/hp-timing.h>
+/* We always assume having the timestamp register.  */
+#define HP_TIMING_AVAIL		(1)
+
+/* We indeed have inlined functions.  */
+#define HP_TIMING_INLINE	(1)
+
+/* We use 64bit values for the times.  */
+typedef unsigned long long int hp_timing_t;
 
 /* The "=A" constraint used in 32-bit mode does not work in 64-bit mode.  */
-# undef HP_TIMING_NOW
-# define HP_TIMING_NOW(Var) \
+#define HP_TIMING_NOW(Var) \
   ({ unsigned int _hi, _lo; \
      asm volatile ("rdtsc" : "=a" (_lo), "=d" (_hi)); \
      (Var) = ((unsigned long long int) _hi << 32) | _lo; })
 
+#include <hp-timing-common.h>
+
 #endif /* hp-timing.h */

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=428dd03f5a7291d19f0c45fc314da9356ee22d63

commit 428dd03f5a7291d19f0c45fc314da9356ee22d63
Author: Richard Henderson <rth@twiddle.net>
Date:   Wed Jun 25 12:27:16 2014 -0700

    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.

diff --git a/benchtests/bench-string.h b/benchtests/bench-string.h
index 2609680..bdb927f 100644
--- a/benchtests/bench-string.h
+++ b/benchtests/bench-string.h
@@ -69,8 +69,6 @@ int ret, do_srandom;
 unsigned int seed;
 size_t page_size;
 
-hp_timing_t _dl_hp_timing_overhead;
-
 # ifndef ITERATIONS
 size_t iterations = 100000;
 #  define ITERATIONS_OPTIONS \
diff --git a/benchtests/bench-timing.h b/benchtests/bench-timing.h
index ccde601..87da32f 100644
--- a/benchtests/bench-timing.h
+++ b/benchtests/bench-timing.h
@@ -22,16 +22,11 @@
 #if HP_TIMING_AVAIL && !defined USE_CLOCK_GETTIME
 # define GL(x) _##x
 # define GLRO(x) _##x
-hp_timing_t _dl_hp_timing_overhead;
 typedef hp_timing_t timing_t;
 
 # define TIMING_TYPE "hp_timing"
 
-# define TIMING_INIT(res) \
-({									      \
-  HP_TIMING_DIFF_INIT();						      \
-  (res) = 1;							      \
-})
+# define TIMING_INIT(res) ({ (res) = 1; })
 
 # define TIMING_NOW(var) HP_TIMING_NOW (var)
 # define TIMING_DIFF(diff, start, end) HP_TIMING_DIFF ((diff), (start), (end))
diff --git a/elf/rtld.c b/elf/rtld.c
index 71cc0db..8239269 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -279,9 +279,6 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
       else
 	start_time = info->start_time;
 #endif
-
-      /* Initialize the timing functions.  */
-      HP_TIMING_DIFF_INIT ();
     }
 
   /* Transfer data about ourselves to the permanent link_map structure.  */
diff --git a/sysdeps/alpha/hp-timing.h b/sysdeps/alpha/hp-timing.h
index 71322f9..9745e53 100644
--- a/sysdeps/alpha/hp-timing.h
+++ b/sysdeps/alpha/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,9 +77,6 @@ typedef unsigned int hp_timing_t;
     (VAR) = (int) (x_) - (int) (x_ >> 32);				      \
   } while (0)
 
-/* ??? Two rpcc instructions can be scheduled simultaneously.  */
-#define HP_TIMING_DIFF_INIT() do { } while (0)
-
 /* It's simple arithmetic for us.  */
 #define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
 
diff --git a/sysdeps/generic/hp-timing.h b/sysdeps/generic/hp-timing.h
index 894ab17..49ddb91 100644
--- a/sysdeps/generic/hp-timing.h
+++ b/sysdeps/generic/hp-timing.h
@@ -42,9 +42,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.
 
@@ -62,7 +59,6 @@
 #define HP_TIMING_INLINE	(0)
 typedef int hp_timing_t;
 #define HP_TIMING_NOW(var)
-#define HP_TIMING_DIFF_INIT()
 #define HP_TIMING_DIFF(Diff, Start, End)
 #define HP_TIMING_ACCUM_NT(Sum, Diff)
 #define HP_TIMING_PRINT(Buf, Len, Val)
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 96f018d..2acddaa 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -532,11 +532,6 @@ struct rtld_global_ro
   /* All search directories defined at startup.  */
   EXTERN struct r_search_path_elem *_dl_init_all_dirs;
 
-#if HP_TIMING_AVAIL || HP_SMALL_TIMING_AVAIL
-  /* Overhead of a high-precision timing measurement.  */
-  EXTERN hp_timing_t _dl_hp_timing_overhead;
-#endif
-
 #ifdef NEED_DL_SYSINFO
   /* Syscall handling improvements.  This is very specific to x86.  */
   EXTERN uintptr_t _dl_sysinfo;
diff --git a/sysdeps/i386/i686/Makefile b/sysdeps/i386/i686/Makefile
index 01c2917..5ce9fc6 100644
--- a/sysdeps/i386/i686/Makefile
+++ b/sysdeps/i386/i686/Makefile
@@ -1,8 +1,3 @@
-ifeq ($(subdir),csu)
-sysdep_routines += hp-timing
-elide-routines.os += hp-timing
-endif
-
 # So that we can test __m128's alignment
 stack-align-test-flags += -msse
 
diff --git a/sysdeps/i386/i686/hp-timing.c b/sysdeps/i386/i686/hp-timing.c
deleted file mode 100644
index faa6dad..0000000
--- a/sysdeps/i386/i686/hp-timing.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Support for high precision, low overhead timing functions.  i686 version.
-   Copyright (C) 1998-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <hp-timing.h>
-
-/* We have to define the variable for the overhead.  */
-hp_timing_t _dl_hp_timing_overhead;
diff --git a/sysdeps/i386/i686/hp-timing.h b/sysdeps/i386/i686/hp-timing.h
index a4b19c1..12c613e 100644
--- a/sysdeps/i386/i686/hp-timing.h
+++ b/sysdeps/i386/i686/hp-timing.h
@@ -52,9 +52,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.
 
@@ -83,25 +80,6 @@ typedef unsigned long long int hp_timing_t;
    in accurate clock cycles here so we don't do this.  */
 #define HP_TIMING_NOW(Var)	__asm__ __volatile__ ("rdtsc" : "=A" (Var))
 
-/* Use two 'rdtsc' instructions in a row to find out how long it takes.  */
-#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 for us.  */
 #define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
 
diff --git a/sysdeps/ia64/Makefile b/sysdeps/ia64/Makefile
index 2ea937a..09e41f2 100644
--- a/sysdeps/ia64/Makefile
+++ b/sysdeps/ia64/Makefile
@@ -7,8 +7,6 @@ endif
 
 ifeq ($(subdir), csu)
 CPPFLAGS-start.S = -D__ASSEMBLY__
-sysdep_routines += hp-timing
-elide-routines.os += hp-timing
 
 ifeq (yes,$(build-shared))
 # Compatibility
diff --git a/sysdeps/ia64/hp-timing.c b/sysdeps/ia64/hp-timing.c
deleted file mode 100644
index 7a661cb..0000000
--- a/sysdeps/ia64/hp-timing.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Support for high precision, low overhead timing functions.  IA-64 version.
-   Copyright (C) 2001-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <hp-timing.h>
-
-/* We have to define the variable for the overhead.  */
-hp_timing_t _dl_hp_timing_overhead;
diff --git a/sysdeps/ia64/hp-timing.h b/sysdeps/ia64/hp-timing.h
index ccc49e6..6b49ffc 100644
--- a/sysdeps/ia64/hp-timing.h
+++ b/sysdeps/ia64/hp-timing.h
@@ -46,9 +46,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.
 
@@ -84,22 +81,6 @@ typedef unsigned long int hp_timing_t;
      while (REPEAT_READ (__itc));					      \
      Var = __itc; })
 
-/* Use two 'ar.itc' instructions in a row to find out how long it takes.  */
-#define HP_TIMING_DIFF_INIT() \
-  do {									      \
-    int __cnt = 5;							      \
-    GLRO(dl_hp_timing_overhead) = ~0ul;					      \
-    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 for us.  */
 #define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
 
diff --git a/sysdeps/powerpc/powerpc32/power4/hp-timing.c b/sysdeps/powerpc/powerpc32/power4/hp-timing.c
deleted file mode 100644
index fcf5e45..0000000
--- a/sysdeps/powerpc/powerpc32/power4/hp-timing.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Support for high precision, low overhead timing functions.
-   powerpc64 version.
-   Copyright (C) 2005-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <hp-timing.h>
-
-/* We have to define the variable for the overhead.  */
-hp_timing_t _dl_hp_timing_overhead;
diff --git a/sysdeps/powerpc/powerpc32/power4/hp-timing.h b/sysdeps/powerpc/powerpc32/power4/hp-timing.h
index cd296c5..702efac 100644
--- a/sysdeps/powerpc/powerpc32/power4/hp-timing.h
+++ b/sysdeps/powerpc/powerpc32/power4/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.
 
@@ -88,27 +85,6 @@ typedef unsigned long long int hp_timing_t;
     Var = ((hp_timing_t) hi << 32) | lo;				\
   } while (0)
 
-
-/* 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))
 
diff --git a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
index 171e89b..9d15db0 100644
--- a/sysdeps/powerpc/powerpc64/Makefile
+++ b/sysdeps/powerpc/powerpc64/Makefile
@@ -35,11 +35,6 @@ CFLAGS-rtld-memmove.os = $(no-special-regs)
 CFLAGS-rtld-memchr.os = $(no-special-regs)
 CFLAGS-rtld-strnlen.os = $(no-special-regs)
 
-ifeq ($(subdir),csu)
-sysdep_routines += hp-timing
-elide-routines.os += hp-timing
-endif
-
 ifeq ($(subdir),elf)
 # help gcc inline asm code from dl-machine.h
 +cflags += -finline-limit=2000
diff --git a/sysdeps/powerpc/powerpc64/hp-timing.c b/sysdeps/powerpc/powerpc64/hp-timing.c
deleted file mode 100644
index fcf5e45..0000000
--- a/sysdeps/powerpc/powerpc64/hp-timing.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Support for high precision, low overhead timing functions.
-   powerpc64 version.
-   Copyright (C) 2005-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <hp-timing.h>
-
-/* We have to define the variable for the overhead.  */
-hp_timing_t _dl_hp_timing_overhead;
diff --git a/sysdeps/powerpc/powerpc64/hp-timing.h b/sysdeps/powerpc/powerpc64/hp-timing.h
index 4cad90a..7241b9b 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))
 
diff --git a/sysdeps/sparc/sparc32/sparcv9/Makefile b/sysdeps/sparc/sparc32/sparcv9/Makefile
index 36f889e..925fa4f 100644
--- a/sysdeps/sparc/sparc32/sparcv9/Makefile
+++ b/sysdeps/sparc/sparc32/sparcv9/Makefile
@@ -1,10 +1,5 @@
 sysdep-CFLAGS += -mcpu=ultrasparc -Wa,-Av9a
 
-ifeq ($(subdir),csu)
-sysdep_routines += hp-timing
-elide-routines.os += hp-timing
-endif
-
 ifeq ($(have-as-vis3),yes)
 ASFLAGS-.o += -Wa,-Av9d
 ASFLAGS-.os += -Wa,-Av9d
diff --git a/sysdeps/sparc/sparc32/sparcv9/hp-timing.c b/sysdeps/sparc/sparc32/sparcv9/hp-timing.c
deleted file mode 100644
index 2224099..0000000
--- a/sysdeps/sparc/sparc32/sparcv9/hp-timing.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Support for high precision, low overhead timing functions.  sparcv9 version.
-   Copyright (C) 2001-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David S. Miller <davem@redhat.com>, 2001.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <hp-timing.h>
-
-/* We have to define the variable for the overhead.  */
-hp_timing_t _dl_hp_timing_overhead;
diff --git a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
index c3be1ca..3f63ce6 100644
--- a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
+++ b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
@@ -34,21 +34,6 @@ typedef unsigned long long int hp_timing_t;
 			    "srlx %L0, 32, %H0" \
 			    : "=r" (Var))
 
-#define HP_TIMING_DIFF_INIT() \
-  do {									      \
-    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)
-
 #define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
 
 #define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
diff --git a/sysdeps/sparc/sparc64/Makefile b/sysdeps/sparc/sparc64/Makefile
index dd3023d..dfc118c 100644
--- a/sysdeps/sparc/sparc64/Makefile
+++ b/sysdeps/sparc/sparc64/Makefile
@@ -1,8 +1,3 @@
-ifeq ($(subdir),csu)
-sysdep_routines += hp-timing
-elide-routines.os += hp-timing
-endif
-
 ifeq ($(subdir),string)
 sysdep_routines += align-cpy
 endif
diff --git a/sysdeps/sparc/sparc64/hp-timing.c b/sysdeps/sparc/sparc64/hp-timing.c
deleted file mode 100644
index 0a425ed..0000000
--- a/sysdeps/sparc/sparc64/hp-timing.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Support for high precision, low overhead timing functions.  sparc64 version.
-   Copyright (C) 2001-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by David S. Miller <davem@redhat.com>, 2001.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <hp-timing.h>
-
-/* We have to define the variable for the overhead.  */
-hp_timing_t _dl_hp_timing_overhead;
diff --git a/sysdeps/sparc/sparc64/hp-timing.h b/sysdeps/sparc/sparc64/hp-timing.h
index 9e49b78..521f64e 100644
--- a/sysdeps/sparc/sparc64/hp-timing.h
+++ b/sysdeps/sparc/sparc64/hp-timing.h
@@ -31,21 +31,6 @@ typedef unsigned long int hp_timing_t;
 
 #define HP_TIMING_NOW(Var) __asm__ __volatile__ ("rd %%tick, %0" : "=r" (Var))
 
-#define HP_TIMING_DIFF_INIT() \
-  do {									      \
-    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)
-
 #define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
 
 #define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
index 58900a5..32b36d5 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -2,8 +2,6 @@
 long-double-fcts = yes
 
 ifeq ($(subdir),csu)
-sysdep_routines += hp-timing
-elide-routines.os += hp-timing
 gen-as-const-headers += link-defines.sym
 endif
 
diff --git a/sysdeps/x86_64/hp-timing.c b/sysdeps/x86_64/hp-timing.c
deleted file mode 100644
index 289ca4c..0000000
--- a/sysdeps/x86_64/hp-timing.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* We can use the i686 implementation without changes.  */
-#include <sysdeps/i386/i686/hp-timing.c>

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c39323e9d2fb6697d5d8739ad9b7959c88a6d5a1

commit c39323e9d2fb6697d5d8739ad9b7959c88a6d5a1
Author: Richard Henderson <rth@twiddle.net>
Date:   Wed Jun 25 12:15:19 2014 -0700

    Removing HP_TIMING_ACCUM as unused

diff --git a/sysdeps/alpha/hp-timing.h b/sysdeps/alpha/hp-timing.h
index 4cbee66..71322f9 100644
--- a/sysdeps/alpha/hp-timing.h
+++ b/sysdeps/alpha/hp-timing.h
@@ -51,13 +51,8 @@
    - HP_TIMING_DIFF: compute difference between two times and store it
      in a third.  Source and destination might overlap.
 
-   - HP_TIMING_ACCUM: add time difference to another variable.  This might
-     be a bit more complicated to implement for some platforms as the
-     operation should be thread-safe and 64bit arithmetic on 32bit platforms
-     is not.
-
-   - HP_TIMING_ACCUM_NT: this is the variant for situations where we know
-     there are no threads involved.
+   - HP_TIMING_ACCUM_NT: add time difference to another variable, without
+     being thread-safe.
 
    - HP_TIMING_PRINT: write decimal representation of the timing value into
      the given string.  This operation need not be inline even though
@@ -91,10 +86,6 @@ typedef unsigned int hp_timing_t;
 /* It's simple arithmetic for us.  */
 #define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
 
-/* ??? Don't bother, since we're only used for ld.so.  */
-#define HP_TIMING_ACCUM(Sum, Diff)  not implemented
-
-/* No threads, no extra work.  */
 #define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
 
 /* Print the time value.  */
diff --git a/sysdeps/generic/hp-timing.h b/sysdeps/generic/hp-timing.h
index bf78e4e..894ab17 100644
--- a/sysdeps/generic/hp-timing.h
+++ b/sysdeps/generic/hp-timing.h
@@ -48,13 +48,8 @@
    - HP_TIMING_DIFF: compute difference between two times and store it
      in a third.  Source and destination might overlap.
 
-   - HP_TIMING_ACCUM: add time difference to another variable.  This might
-     be a bit more complicated to implement for some platforms as the
-     operation should be thread-safe and 64bit arithmetic on 32bit platforms
-     is not.
-
-   - HP_TIMING_ACCUM_NT: this is the variant for situations where we know
-     there are no threads involved.
+   - HP_TIMING_ACCUM_NT: add time difference to another variable, without
+     being thread-safe.
 
    - HP_TIMING_PRINT: write decimal representation of the timing value into
      the given string.  This operation need not be inline even though
@@ -69,7 +64,6 @@ typedef int hp_timing_t;
 #define HP_TIMING_NOW(var)
 #define HP_TIMING_DIFF_INIT()
 #define HP_TIMING_DIFF(Diff, Start, End)
-#define HP_TIMING_ACCUM(Sum, Diff)
 #define HP_TIMING_ACCUM_NT(Sum, Diff)
 #define HP_TIMING_PRINT(Buf, Len, Val)
 
diff --git a/sysdeps/i386/i686/hp-timing.h b/sysdeps/i386/i686/hp-timing.h
index 18e5b95..a4b19c1 100644
--- a/sysdeps/i386/i686/hp-timing.h
+++ b/sysdeps/i386/i686/hp-timing.h
@@ -58,13 +58,8 @@
    - HP_TIMING_DIFF: compute difference between two times and store it
      in a third.  Source and destination might overlap.
 
-   - HP_TIMING_ACCUM: add time difference to another variable.  This might
-     be a bit more complicated to implement for some platforms as the
-     operation should be thread-safe and 64bit arithmetic on 32bit platforms
-     is not.
-
-   - HP_TIMING_ACCUM_NT: this is the variant for situations where we know
-     there are no threads involved.
+   - HP_TIMING_ACCUM_NT: add time difference to another variable, without
+     being thread-safe.
 
    - HP_TIMING_PRINT: write decimal representation of the timing value into
      the given string.  This operation need not be inline even though
@@ -110,30 +105,6 @@ typedef unsigned long long int hp_timing_t;
 /* It's simple arithmetic for us.  */
 #define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
 
-/* We have to jump through hoops to get this correctly implemented.  */
-#define HP_TIMING_ACCUM(Sum, Diff) \
-  do {									      \
-    int __not_done;							      \
-    hp_timing_t __oldval = (Sum);					      \
-    hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead);		      \
-    do									      \
-      {									      \
-	hp_timing_t __newval = __oldval + __diff;			      \
-	int __temp0, __temp1;						      \
-	__asm__ __volatile__ ("xchgl %0, %%ebx\n\t"			      \
-			      "lock; cmpxchg8b %1\n\t"			      \
-			      "sete %%bl\n\t"				      \
-			      "xchgl %0, %%ebx"				      \
-			      : "=SD" (__not_done), "=m" (Sum),		      \
-				"=A" (__oldval), "=c" (__temp0)		      \
-			      : "m" (Sum), "2" (__oldval),		      \
-				"3" ((unsigned int) (__newval >> 32)),	      \
-				"0" ((unsigned int) __newval));		      \
-      }									      \
-    while ((unsigned char) __not_done);					      \
-  } while (0)
-
-/* No threads, no extra work.  */
 #define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
 
 /* Print the time value.  */
diff --git a/sysdeps/ia64/hp-timing.h b/sysdeps/ia64/hp-timing.h
index e91326c..ccc49e6 100644
--- a/sysdeps/ia64/hp-timing.h
+++ b/sysdeps/ia64/hp-timing.h
@@ -52,13 +52,8 @@
    - HP_TIMING_DIFF: compute difference between two times and store it
      in a third.  Source and destination might overlap.
 
-   - HP_TIMING_ACCUM: add time difference to another variable.  This might
-     be a bit more complicated to implement for some platforms as the
-     operation should be thread-safe and 64bit arithmetic on 32bit platforms
-     is not.
-
-   - HP_TIMING_ACCUM_NT: this is the variant for situations where we know
-     there are no threads involved.
+   - HP_TIMING_ACCUM_NT: add time difference to another variable, without
+     being thread-safe.
 
    - HP_TIMING_PRINT: write decimal representation of the timing value into
      the given string.  This operation need not be inline even though
@@ -108,21 +103,6 @@ typedef unsigned long int hp_timing_t;
 /* It's simple arithmetic for us.  */
 #define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
 
-/* We have to jump through hoops to get this correctly implemented.  */
-#define HP_TIMING_ACCUM(Sum, Diff) \
-  do {									      \
-    hp_timing_t __oldval;						      \
-    hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead);		      \
-    hp_timing_t __newval;						      \
-    do									      \
-      {									      \
-	__oldval = (Sum);						      \
-	__newval = __oldval + __diff;					      \
-      }									      \
-    while (! __sync_bool_compare_and_swap (&Sum, __oldvar, __newval));	      \
-  } while (0)
-
-/* No threads, no extra work.  */
 #define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
 
 /* Print the time value.  */
diff --git a/sysdeps/powerpc/powerpc32/power4/hp-timing.h b/sysdeps/powerpc/powerpc32/power4/hp-timing.h
index 2124e02..cd296c5 100644
--- a/sysdeps/powerpc/powerpc32/power4/hp-timing.h
+++ b/sysdeps/powerpc/powerpc32/power4/hp-timing.h
@@ -51,13 +51,8 @@
    - HP_TIMING_DIFF: compute difference between two times and store it
      in a third.  Source and destination might overlap.
 
-   - HP_TIMING_ACCUM: add time difference to another variable.  This might
-     be a bit more complicated to implement for some platforms as the
-     operation should be thread-safe and 64bit arithmetic on 32bit platforms
-     is not.
-
-   - HP_TIMING_ACCUM_NT: this is the variant for situations where we know
-     there are no threads involved.
+   - HP_TIMING_ACCUM_NT: add time difference to another variable, without
+     being thread-safe.
 
    - HP_TIMING_PRINT: write decimal representation of the timing value into
      the given string.  This operation need not be inline even though
@@ -117,15 +112,6 @@ typedef unsigned long long int hp_timing_t;
 /* It's simple arithmetic in 64-bit.  */
 #define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
 
-/* We need to insure that this add is atomic in threaded environments.  We use
-   __arch_atomic_exchange_and_add_64 from atomic.h to get thread safety.  */
-#define HP_TIMING_ACCUM(Sum, Diff) \
-  do {									      \
-    hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead);		      \
-    __arch_atomic_exchange_and_add_64 (&(Sum), __diff);	                      \
-  } while (0)
-
-/* No threads, no extra work.  */
 #define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
 
 /* Print the time value.  */
diff --git a/sysdeps/powerpc/powerpc64/hp-timing.h b/sysdeps/powerpc/powerpc64/hp-timing.h
index c773541..4cad90a 100644
--- a/sysdeps/powerpc/powerpc64/hp-timing.h
+++ b/sysdeps/powerpc/powerpc64/hp-timing.h
@@ -51,13 +51,8 @@
    - HP_TIMING_DIFF: compute difference between two times and store it
      in a third.  Source and destination might overlap.
 
-   - HP_TIMING_ACCUM: add time difference to another variable.  This might
-     be a bit more complicated to implement for some platforms as the
-     operation should be thread-safe and 64bit arithmetic on 32bit platforms
-     is not.
-
-   - HP_TIMING_ACCUM_NT: this is the variant for situations where we know
-     there are no threads involved.
+   - HP_TIMING_ACCUM_NT: add time difference to another variable, without
+     being thread-safe.
 
    - HP_TIMING_PRINT: write decimal representation of the timing value into
      the given string.  This operation need not be inline even though
@@ -108,15 +103,6 @@ typedef unsigned long long int hp_timing_t;
 /* It's simple arithmetic in 64-bit.  */
 #define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
 
-/* We need to insure that this add is atomic in threaded environments.  We use
-   __arch_atomic_exchange_and_add_64 from atomic.h to get thread safety.  */
-#define HP_TIMING_ACCUM(Sum, Diff) \
-  do {									      \
-    hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead);		      \
-    __arch_atomic_exchange_and_add_64 (&(Sum), __diff);	                      \
-  } while (0)
-
-/* No threads, no extra work.  */
 #define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
 
 /* Print the time value.  */
diff --git a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
index fbfb861..c3be1ca 100644
--- a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
+++ b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
@@ -51,23 +51,6 @@ typedef unsigned long long int hp_timing_t;
 
 #define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
 
-#define HP_TIMING_ACCUM(Sum, Diff)				\
-do {								\
-  hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead);	\
-  __asm__ __volatile__("srl	%L0, 0, %%g1\n\t"		\
-		       "sllx	%H0, 32, %%g6\n\t"		\
-		       "or	%%g1, %%g6, %%g1\n\t"		\
-		       "1: ldx	[%1], %%g5\n\t"			\
-		       "add	%%g5, %%g1, %%g6\n\t"		\
-		       "casx	[%1], %%g5,  %%g6\n\t"		\
-		       "cmp	%%g5, %%g6\n\t"			\
-		       "bne,pn	%%xcc, 1b\n\t"			\
-		       " nop"					\
-		       : /* no outputs */			\
-		       : "r" (__diff), "r" (&(Sum))		\
-		       : "memory", "g1", "g5", "g6");		\
-} while(0)
-
 #define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
 
 #define HP_TIMING_PRINT(Buf, Len, Val) \
diff --git a/sysdeps/sparc/sparc64/hp-timing.h b/sysdeps/sparc/sparc64/hp-timing.h
index 0773efb..9e49b78 100644
--- a/sysdeps/sparc/sparc64/hp-timing.h
+++ b/sysdeps/sparc/sparc64/hp-timing.h
@@ -48,21 +48,6 @@ typedef unsigned long int hp_timing_t;
 
 #define HP_TIMING_DIFF(Diff, Start, End)	(Diff) = ((End) - (Start))
 
-#define HP_TIMING_ACCUM(Sum, Diff)				\
-do {								\
-  hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead);	\
-  hp_timing_t tmp1, tmp2;					\
-  __asm__ __volatile__("1: ldx	[%3], %0\n\t"			\
-		       "add	%0, %2, %1\n\t"			\
-		       "casx	[%3], %0,  %1\n\t"		\
-		       "cmp	%0, %1\n\t"			\
-		       "bne,pn	%%xcc, 1b\n\t"			\
-		       " nop"					\
-		       : "=&r" (tmp1), "=&r" (tmp2)		\
-		       : "r" (__diff), "r" (&(Sum))		\
-		       : "memory", "g1", "g5", "g6");		\
-} while(0)
-
 #define HP_TIMING_ACCUM_NT(Sum, Diff)	(Sum) += (Diff)
 
 #define HP_TIMING_PRINT(Buf, Len, Val) \
diff --git a/sysdeps/x86_64/hp-timing.h b/sysdeps/x86_64/hp-timing.h
index d88206c..e132dac 100644
--- a/sysdeps/x86_64/hp-timing.h
+++ b/sysdeps/x86_64/hp-timing.h
@@ -28,13 +28,4 @@
      asm volatile ("rdtsc" : "=a" (_lo), "=d" (_hi)); \
      (Var) = ((unsigned long long int) _hi << 32) | _lo; })
 
-/* The funny business for 32-bit mode is not required here.  */
-# undef HP_TIMING_ACCUM
-# define HP_TIMING_ACCUM(Sum, Diff)					      \
-  do {									      \
-    hp_timing_t __diff = (Diff) - GLRO(dl_hp_timing_overhead);		      \
-    __asm__ __volatile__ ("lock; addq %1, %0"				      \
-			  : "=m" (Sum) : "r" (__diff), "m" (Sum));	      \
-  } while (0)
-
 #endif /* hp-timing.h */

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=850e0e032b77ee833a9f98d1bef3f50769bdd0c7

commit 850e0e032b77ee833a9f98d1bef3f50769bdd0c7
Author: Richard Henderson <rth@twiddle.net>
Date:   Wed Jun 25 11:40:18 2014 -0700

    Removing HP_TIMING_ZERO as unused

diff --git a/sysdeps/alpha/hp-timing.h b/sysdeps/alpha/hp-timing.h
index 90f9b9d..4cbee66 100644
--- a/sysdeps/alpha/hp-timing.h
+++ b/sysdeps/alpha/hp-timing.h
@@ -42,8 +42,6 @@
    - hp_timing_t: This is the type for variables used to store the time
      values.
 
-   - HP_TIMING_ZERO: clear `hp_timing_t' object.
-
    - HP_TIMING_NOW: place timestamp for current time in variable given as
      parameter.
 
@@ -77,9 +75,6 @@
 /* We use 32 bit values for the times.  */
 typedef unsigned int hp_timing_t;
 
-/* Set timestamp value to zero.  */
-#define HP_TIMING_ZERO(VAR)	(VAR) = (0)
-
 /* The "rpcc" instruction returns a 32-bit counting half and a 32-bit
    "virtual cycle counter displacement".  Subtracting the two gives us
    a virtual cycle count.  */
diff --git a/sysdeps/generic/hp-timing.h b/sysdeps/generic/hp-timing.h
index eddc971..bf78e4e 100644
--- a/sysdeps/generic/hp-timing.h
+++ b/sysdeps/generic/hp-timing.h
@@ -39,8 +39,6 @@
    - hp_timing_t: This is the type for variables used to store the time
      values.
 
-   - HP_TIMING_ZERO: clear `hp_timing_t' object.
-
    - HP_TIMING_NOW: place timestamp for current time in variable given as
      parameter.
 
@@ -68,7 +66,6 @@
 #define HP_TIMING_AVAIL		(0)
 #define HP_TIMING_INLINE	(0)
 typedef int hp_timing_t;
-#define HP_TIMING_ZERO(Var)
 #define HP_TIMING_NOW(var)
 #define HP_TIMING_DIFF_INIT()
 #define HP_TIMING_DIFF(Diff, Start, End)
diff --git a/sysdeps/i386/i686/hp-timing.h b/sysdeps/i386/i686/hp-timing.h
index 4a2006e..18e5b95 100644
--- a/sysdeps/i386/i686/hp-timing.h
+++ b/sysdeps/i386/i686/hp-timing.h
@@ -49,8 +49,6 @@
    - hp_timing_t: This is the type for variables used to store the time
      values.
 
-   - HP_TIMING_ZERO: clear `hp_timing_t' object.
-
    - HP_TIMING_NOW: place timestamp for current time in variable given as
      parameter.
 
@@ -83,9 +81,6 @@
 /* We use 64bit values for the times.  */
 typedef unsigned long long int hp_timing_t;
 
-/* Set timestamp value to zero.  */
-#define HP_TIMING_ZERO(Var)	(Var) = (0)
-
 /* That's quite simple.  Use the `rdtsc' instruction.  Note that the value
    might not be 100% accurate since there might be some more instructions
    running in this moment.  This could be changed by using a barrier like
diff --git a/sysdeps/ia64/hp-timing.h b/sysdeps/ia64/hp-timing.h
index bf97b47..e91326c 100644
--- a/sysdeps/ia64/hp-timing.h
+++ b/sysdeps/ia64/hp-timing.h
@@ -43,8 +43,6 @@
    - hp_timing_t: This is the type for variables used to store the time
      values.
 
-   - HP_TIMING_ZERO: clear `hp_timing_t' object.
-
    - HP_TIMING_NOW: place timestamp for current time in variable given as
      parameter.
 
@@ -77,10 +75,6 @@
 /* We use 64bit values for the times.  */
 typedef unsigned long int hp_timing_t;
 
-/* Set timestamp value to zero.  */
-#define HP_TIMING_ZERO(Var)	(Var) = (0)
-
-
 /* The Itanium/Merced has a bug where the ar.itc register value read
    is not correct in some situations.  The solution is to read again.
    For now we always do this until we know how to recognize a fixed
diff --git a/sysdeps/powerpc/powerpc32/power4/hp-timing.h b/sysdeps/powerpc/powerpc32/power4/hp-timing.h
index f1e3beb..2124e02 100644
--- a/sysdeps/powerpc/powerpc32/power4/hp-timing.h
+++ b/sysdeps/powerpc/powerpc32/power4/hp-timing.h
@@ -42,8 +42,6 @@
    - hp_timing_t: This is the type for variables used to store the time
      values.
 
-   - HP_TIMING_ZERO: clear `hp_timing_t' object.
-
    - HP_TIMING_NOW: place timestamp for current time in variable given as
      parameter.
 
@@ -76,9 +74,6 @@
 /* We use 64bit values for the times.  */
 typedef unsigned long long int hp_timing_t;
 
-/* Set timestamp value to zero.  */
-#define HP_TIMING_ZERO(Var)	(Var) = (0)
-
 /* That's quite simple.  Use the `mftb' instruction.  Note that the value
    might not be 100% accurate since there might be some more instructions
    running in this moment.  This could be changed by using a barrier like
diff --git a/sysdeps/powerpc/powerpc64/hp-timing.h b/sysdeps/powerpc/powerpc64/hp-timing.h
index f1efa12..c773541 100644
--- a/sysdeps/powerpc/powerpc64/hp-timing.h
+++ b/sysdeps/powerpc/powerpc64/hp-timing.h
@@ -42,8 +42,6 @@
    - hp_timing_t: This is the type for variables used to store the time
      values.
 
-   - HP_TIMING_ZERO: clear `hp_timing_t' object.
-
    - HP_TIMING_NOW: place timestamp for current time in variable given as
      parameter.
 
@@ -76,9 +74,6 @@
 /* We use 64bit values for the times.  */
 typedef unsigned long long int hp_timing_t;
 
-/* Set timestamp value to zero.  */
-#define HP_TIMING_ZERO(Var)	(Var) = (0)
-
 /* That's quite simple.  Use the `mftb' instruction.  Note that the value
    might not be 100% accurate since there might be some more instructions
    running in this moment.  This could be changed by using a barrier like
diff --git a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
index fd7e76e..fbfb861 100644
--- a/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
+++ b/sysdeps/sparc/sparc32/sparcv9/hp-timing.h
@@ -29,8 +29,6 @@
 
 typedef unsigned long long int hp_timing_t;
 
-#define HP_TIMING_ZERO(Var)	(Var) = (0)
-
 #define HP_TIMING_NOW(Var) \
       __asm__ __volatile__ ("rd %%tick, %L0\n\t" \
 			    "srlx %L0, 32, %H0" \
diff --git a/sysdeps/sparc/sparc64/hp-timing.h b/sysdeps/sparc/sparc64/hp-timing.h
index fa08cc8..0773efb 100644
--- a/sysdeps/sparc/sparc64/hp-timing.h
+++ b/sysdeps/sparc/sparc64/hp-timing.h
@@ -29,8 +29,6 @@
 
 typedef unsigned long int hp_timing_t;
 
-#define HP_TIMING_ZERO(Var)	(Var) = (0)
-
 #define HP_TIMING_NOW(Var) __asm__ __volatile__ ("rd %%tick, %0" : "=r" (Var))
 
 #define HP_TIMING_DIFF_INIT() \

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7db48f6aab371ffce155b9ac8705673b2bf3cbbd

commit 7db48f6aab371ffce155b9ac8705673b2bf3cbbd
Author: Richard Henderson <rth@twiddle.net>
Date:   Wed Jun 25 11:36:52 2014 -0700

    powerpc: Remove dummy hp-timing.h
    
    It's the same as the generic dummy version.

diff --git a/sysdeps/powerpc/powerpc32/hp-timing.h b/sysdeps/powerpc/powerpc32/hp-timing.h
deleted file mode 100644
index 9ff52eb..0000000
--- a/sysdeps/powerpc/powerpc32/hp-timing.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/* High precision, low overhead timing functions.  Linux/PPC32 version.
-   Copyright (C) 2005-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _HP_TIMING_H
-#define _HP_TIMING_H	1
-
-
-/* There are no generic definitions for the times.  We could write something
-   using the `gettimeofday' system call where available but the overhead of
-   the system call might be too high.
-
-   In case a platform supports timers in the hardware the following macros
-   and types must be defined:
-
-   - HP_TIMING_AVAIL: test for availability.
-
-   - HP_TIMING_INLINE: this macro is non-zero if the functionality is not
-     implemented using function calls but instead uses some inlined code
-     which might simply consist of a few assembler instructions.  We have to
-     know this since we might want to use the macros here in places where we
-     cannot make function calls.
-
-   - hp_timing_t: This is the type for variables used to store the time
-     values.
-
-   - HP_TIMING_ZERO: clear `hp_timing_t' object.
-
-   - 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.
-
-   - HP_TIMING_ACCUM: add time difference to another variable.  This might
-     be a bit more complicated to implement for some platforms as the
-     operation should be thread-safe and 64bit arithmetic on 32bit platforms
-     is not.
-
-   - HP_TIMING_ACCUM_NT: this is the variant for situations where we know
-     there are no threads involved.
-
-   - HP_TIMING_PRINT: write decimal representation of the timing value into
-     the given string.  This operation need not be inline even though
-     HP_TIMING_INLINE is specified.
-
-*/
-
-/* Provide dummy definitions.  */
-#define HP_TIMING_AVAIL		(0)
-#define HP_TIMING_INLINE	(0)
-typedef unsigned long long int hp_timing_t;
-#define HP_TIMING_ZERO(Var)
-#define HP_TIMING_NOW(var)
-#define HP_TIMING_DIFF_INIT()
-#define HP_TIMING_DIFF(Diff, Start, End)
-#define HP_TIMING_ACCUM(Sum, Diff)
-#define HP_TIMING_ACCUM_NT(Sum, Diff)
-#define HP_TIMING_PRINT(Buf, Len, Val)
-
-/* Since this implementation is not available we tell the user about it.  */
-#define HP_TIMING_NONAVAIL	1
-
-#endif /* hp-timing.h */

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                     |   82 +++++++++++++++++
 benchtests/bench-string.h                     |    2 -
 benchtests/bench-timing.h                     |    7 +--
 elf/dl-support.c                              |    8 +--
 elf/rtld.c                                    |   21 +----
 elf/tst-pie2.c => sysdeps/aarch64/hp-timing.h |   32 ++++----
 sysdeps/alpha/hp-timing.h                     |   73 +---------------
 sysdeps/generic/hp-timing-common.h            |   62 +++++++++++++
 sysdeps/generic/hp-timing.h                   |   46 +---------
 sysdeps/generic/ldsodefs.h                    |    7 +--
 sysdeps/i386/i686/Makefile                    |    5 -
 sysdeps/i386/i686/hp-timing.c                 |   23 -----
 sysdeps/i386/i686/hp-timing.h                 |  118 +------------------------
 sysdeps/ia64/Makefile                         |    2 -
 sysdeps/ia64/hp-timing.c                      |   23 -----
 sysdeps/ia64/hp-timing.h                      |  102 +---------------------
 sysdeps/powerpc/powerpc32/hp-timing.h         |   81 -----------------
 sysdeps/powerpc/powerpc32/power4/hp-timing.c  |   24 -----
 sysdeps/powerpc/powerpc32/power4/hp-timing.h  |   98 +--------------------
 sysdeps/powerpc/powerpc64/Makefile            |    5 -
 sysdeps/powerpc/powerpc64/hp-timing.c         |   24 -----
 sysdeps/powerpc/powerpc64/hp-timing.h         |   97 +--------------------
 sysdeps/sparc/sparc32/sparcv9/Makefile        |    5 -
 sysdeps/sparc/sparc32/sparcv9/hp-timing.c     |   23 -----
 sysdeps/sparc/sparc32/sparcv9/hp-timing.h     |   54 +-----------
 sysdeps/sparc/sparc64/Makefile                |    5 -
 sysdeps/sparc/sparc64/hp-timing.c             |   23 -----
 sysdeps/sparc/sparc64/hp-timing.h             |   52 +-----------
 sysdeps/x86_64/Makefile                       |    2 -
 sysdeps/x86_64/hp-timing.c                    |    2 -
 sysdeps/x86_64/hp-timing.h                    |   24 +++---
 31 files changed, 195 insertions(+), 937 deletions(-)
 copy elf/tst-pie2.c => sysdeps/aarch64/hp-timing.h (56%)
 create mode 100644 sysdeps/generic/hp-timing-common.h
 delete mode 100644 sysdeps/i386/i686/hp-timing.c
 delete mode 100644 sysdeps/ia64/hp-timing.c
 delete mode 100644 sysdeps/powerpc/powerpc32/hp-timing.h
 delete mode 100644 sysdeps/powerpc/powerpc32/power4/hp-timing.c
 delete mode 100644 sysdeps/powerpc/powerpc64/hp-timing.c
 delete mode 100644 sysdeps/sparc/sparc32/sparcv9/hp-timing.c
 delete mode 100644 sysdeps/sparc/sparc64/hp-timing.c
 delete mode 100644 sysdeps/x86_64/hp-timing.c


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]