summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-12-16 13:43:38 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-12-28 14:57:57 -0300
commita75b1e35c542342f3f3bc5c8ecc9c9c9c7a48c49 (patch)
treebf5958e08900106b0ed320a74e6cef34f8d702c4 /sysdeps
parent92ff345137bfc9e1ecf23c604b7022a25e36cb32 (diff)
downloadglibc-a75b1e35c542342f3f3bc5c8ecc9c9c9c7a48c49.tar.gz
glibc-a75b1e35c542342f3f3bc5c8ecc9c9c9c7a48c49.tar.xz
glibc-a75b1e35c542342f3f3bc5c8ecc9c9c9c7a48c49.zip
malloc: Use hp-timing on libmemusage
Instead of reimplemeting on GETTIME macro.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/memusage.h12
-rw-r--r--sysdeps/i386/i686/memusage.h1
-rw-r--r--sysdeps/ia64/memusage.h7
-rw-r--r--sysdeps/x86_64/memusage.h1
4 files changed, 0 insertions, 21 deletions
diff --git a/sysdeps/generic/memusage.h b/sysdeps/generic/memusage.h
index c9bde5cd11..514bd058d2 100644
--- a/sysdeps/generic/memusage.h
+++ b/sysdeps/generic/memusage.h
@@ -23,15 +23,3 @@
 # warning "GETSP is not defined for this architecture."
 # define GETSP 0
 #endif
-
-#ifndef GETTIME
-# define GETTIME(low,high)						   \
-  {									   \
-    struct __timespec64 now;						   \
-    uint64_t usecs;							   \
-    __clock_gettime64 (CLOCK_REALTIME, &now);				   \
-    usecs = (uint64_t)now.tv_nsec / 1000 + (uint64_t)now.tv_sec * 1000000; \
-    low = usecs & 0xffffffff;						   \
-    high = usecs >> 32;							   \
-  }
-#endif
diff --git a/sysdeps/i386/i686/memusage.h b/sysdeps/i386/i686/memusage.h
index 08b7831e12..07b241263c 100644
--- a/sysdeps/i386/i686/memusage.h
+++ b/sysdeps/i386/i686/memusage.h
@@ -16,6 +16,5 @@
    <https://www.gnu.org/licenses/>.  */
 
 #define GETSP() ({ register uintptr_t stack_ptr asm ("esp"); stack_ptr; })
-#define GETTIME(low,high) asm ("rdtsc" : "=a" (low), "=d" (high))
 
 #include <sysdeps/generic/memusage.h>
diff --git a/sysdeps/ia64/memusage.h b/sysdeps/ia64/memusage.h
index 3c3a526007..33fd6ec899 100644
--- a/sysdeps/ia64/memusage.h
+++ b/sysdeps/ia64/memusage.h
@@ -18,12 +18,5 @@
 #include <hp-timing.h>
 
 #define GETSP() ({ register uintptr_t stack_ptr asm ("%r12"); stack_ptr; })
-#define GETTIME(low, high) \
-  {									      \
-    hp_timing_t __now;							      \
-    HP_TIMING_NOW (__now);						      \
-    low = __now & 0xffffffff;						      \
-    high = __now >> 32;							      \
-  }
 
 #include <sysdeps/generic/memusage.h>
diff --git a/sysdeps/x86_64/memusage.h b/sysdeps/x86_64/memusage.h
index 568dd5512d..6652fc5da1 100644
--- a/sysdeps/x86_64/memusage.h
+++ b/sysdeps/x86_64/memusage.h
@@ -16,6 +16,5 @@
    <https://www.gnu.org/licenses/>.  */
 
 #define GETSP() ({ register uintptr_t stack_ptr asm ("rsp"); stack_ptr; })
-#define GETTIME(low,high) asm ("rdtsc" : "=a" (low), "=d" (high))
 
 #include <sysdeps/generic/memusage.h>