From 428dd03f5a7291d19f0c45fc314da9356ee22d63 Mon Sep 17 00:00:00 2001
From: Richard Henderson <rth@twiddle.net>
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/i386/i686/Makefile    |  5 -----
 sysdeps/i386/i686/hp-timing.c | 23 -----------------------
 sysdeps/i386/i686/hp-timing.h | 22 ----------------------
 3 files changed, 50 deletions(-)
 delete mode 100644 sysdeps/i386/i686/hp-timing.c

(limited to 'sysdeps/i386')

diff --git a/sysdeps/i386/i686/Makefile b/sysdeps/i386/i686/Makefile
index 01c2917892..5ce9fc670a 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 faa6dadd0a..0000000000
--- 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 a4b19c1043..12c613e9de 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))
 
-- 
cgit v1.2.1