diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2018-10-24 02:19:15 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2018-10-24 02:19:34 -0700 |
commit | 7cc65773f04e0f4252428c40dcbb784a39b58cd1 (patch) | |
tree | 8ab811df64ea1c81daac9b4e8b645ea3998acf08 /benchtests/README | |
parent | 18ad0de6513bf8a8e4ba757c069e6806d07920f8 (diff) | |
download | glibc-7cc65773f04e0f4252428c40dcbb784a39b58cd1.tar.gz glibc-7cc65773f04e0f4252428c40dcbb784a39b58cd1.tar.xz glibc-7cc65773f04e0f4252428c40dcbb784a39b58cd1.zip |
x86: Support RDTSCP for benchtests
RDTSCP waits until all previous instructions have executed and all previous loads are globally visible before reading the counter. RDTSC doesn't wait until all previous instructions have been executed before reading the counter. All x86 processors since 2010 support RDTSCP instruction. This patch adds RDTSCP support to benchtests. * benchtests/Makefile (CPPFLAGS-nonlib): Add -DUSE_RDTSCP if USE_RDTSCP is defined. * sysdeps/x86/hp-timing.h (HP_TIMING_NOW): Use RDTSCP if USE_RDTSCP is defined.
Diffstat (limited to 'benchtests/README')
-rw-r--r-- | benchtests/README | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/benchtests/README b/benchtests/README index 4ddff794d1..aaf0b659e2 100644 --- a/benchtests/README +++ b/benchtests/README @@ -34,6 +34,15 @@ the benchmark to use clock_gettime by invoking make as follows: Again, one must run `make bench-clean' before changing the measurement method. +On x86 processors, RDTSCP instruction provides more precise timing data +than RDTSC instruction. All x86 processors since 2010 support RDTSCP +instruction. One can force the benchmark to use RDTSCP by invoking make +as follows: + + $ make USE_RDTSCP=1 bench + +One must run `make bench-clean' before changing the measurement method. + Running benchmarks on another target: ==================================== |