summaryrefslogtreecommitdiff
path: root/configure.cmake
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-06-28 12:52:13 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-06-28 19:19:31 +0300
commit5e929ee8a0487f8929386031e84b1884f503eb48 (patch)
tree5cf8660a940742890a3f3ccc3ae3cc5e7c14e1ad /configure.cmake
parent1635ea9474dc84d1e9a8f8dd6f6cce1c47473b5c (diff)
downloadmariadb-git-5e929ee8a0487f8929386031e84b1884f503eb48.tar.gz
MDEV-19845: Define my_timer_cycles() inline
On clang, use __builtin_readcyclecounter() when available. Hinted by Sergey Vojtovich. (This may lead to runtime failure on ARM systems. The hardware should be available on ARMv8 (AArch64), but access to it may require special privileges.) We remove support for the proprietary Sun Microsystems compiler, and rely on clang or the __GNUC__ assembler syntax instead. For now, we retain support for IA-64 (Itanium) and 32-bit SPARC, even though those platforms are likely no longer widely used. We remove support for clock_gettime(CLOCK_SGI_CYCLE), because Silicon Graphics ceased supporting IRIX in December 2013. This was the only cycle timer interface available for MIPS. On PowerPC, we rely on the GCC 4.8 __builtin_ppc_get_timebase() (or clang __builtin_readcyclecounter()), which should be equivalent to the old assembler code on both 64-bit and 32-bit targets.
Diffstat (limited to 'configure.cmake')
-rw-r--r--configure.cmake5
1 files changed, 0 insertions, 5 deletions
diff --git a/configure.cmake b/configure.cmake
index 07cf752d495..bef4d3c1505 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -437,8 +437,6 @@ SET(CMAKE_REQUIRED_FLAGS)
CHECK_INCLUDE_FILES(time.h HAVE_TIME_H)
CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILES(sys/times.h HAVE_SYS_TIMES_H)
-CHECK_INCLUDE_FILES(asm/msr.h HAVE_ASM_MSR_H)
-#msr.h has rdtscll()
CHECK_INCLUDE_FILES(ia64intrin.h HAVE_IA64INTRIN_H)
@@ -453,9 +451,6 @@ CHECK_FUNCTION_EXISTS(ftime HAVE_FTIME)
CHECK_FUNCTION_EXISTS(time HAVE_TIME)
# We can use time() on Macintosh if there is no ftime().
-CHECK_FUNCTION_EXISTS(rdtscll HAVE_RDTSCLL)
-# I doubt that we'll ever reach the check for this.
-
#
# Tests for symbols