]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - string/test-string.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / string / test-string.h
index 47659d080472c476034f6986eab1d330cd353821..d8bd45b00b2e7ffc35a82b53a45094ba0fee9083 100644 (file)
@@ -1,5 +1,5 @@
 /* Test and measure string and memory functions.
-   Copyright (C) 1999-2013 Free Software Foundation, Inc.
+   Copyright (C) 1999-2015 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Jakub Jelinek <jakub@redhat.com>, 1999.
 
@@ -53,7 +53,6 @@ extern impl_t __start_impls[], __stop_impls[];
 #include <ifunc-impl-list.h>
 #define GL(x) _##x
 #define GLRO(x) _##x
-#include <hp-timing.h>
 
 
 # define TEST_FUNCTION test_main ()
@@ -67,8 +66,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 \
@@ -107,7 +104,7 @@ size_t iterations = 100000;
 #define CALL(impl, ...)        \
   (* (proto_t) (impl)->fn) (__VA_ARGS__)
 
-#if defined TEST_IFUNC && defined TEST_NAME
+#ifdef TEST_NAME
 /* Increase size of FUNC_LIST if assert is triggered at run-time.  */
 static struct libc_ifunc_impl func_list[32];
 static int func_count;
@@ -159,16 +156,6 @@ static impl_t *impl_array;
     if (!notall || impl->test)
 #endif
 
-#define HP_TIMING_BEST(best_time, start, end)  \
-  do                                                                   \
-    {                                                                  \
-      hp_timing_t tmptime;                                             \
-      HP_TIMING_DIFF (tmptime, start + _dl_hp_timing_overhead, end);   \
-      if (best_time > tmptime)                                         \
-       best_time = tmptime;                                            \
-    }                                                                  \
-  while (0)
-
 #ifndef BUF1PAGES
 # define BUF1PAGES 1
 #endif
@@ -176,7 +163,7 @@ static impl_t *impl_array;
 static void
 test_init (void)
 {
-#if defined TEST_IFUNC && defined TEST_NAME
+#ifdef TEST_NAME
   func_count = __libc_ifunc_impl_list (TEST_NAME, func_list,
                                       (sizeof func_list
                                        / sizeof func_list[0]));
@@ -199,7 +186,6 @@ test_init (void)
     error (EXIT_FAILURE, errno, "mmap failed");
   if (mprotect (buf2 + page_size, page_size, PROT_NONE))
     error (EXIT_FAILURE, errno, "mprotect failed");
-  HP_TIMING_DIFF_INIT ();
   if (do_srandom)
     {
       printf ("Setting seed to 0x%x\n", seed);