diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-28 12:52:13 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-06-28 19:19:31 +0300 |
commit | 5e929ee8a0487f8929386031e84b1884f503eb48 (patch) | |
tree | 5cf8660a940742890a3f3ccc3ae3cc5e7c14e1ad /cmake/os | |
parent | 1635ea9474dc84d1e9a8f8dd6f6cce1c47473b5c (diff) | |
download | mariadb-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 'cmake/os')
-rw-r--r-- | cmake/os/SunOS.cmake | 2 | ||||
-rw-r--r-- | cmake/os/WindowsCache.cmake | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/cmake/os/SunOS.cmake b/cmake/os/SunOS.cmake index 4a77b53fb31..27daf2dff1c 100644 --- a/cmake/os/SunOS.cmake +++ b/cmake/os/SunOS.cmake @@ -70,7 +70,7 @@ CHECK_C_SOURCE_RUNS( # Check is special processor flag needs to be set on older GCC -#that defaults to v8 sparc . Code here is taken from my_rdtsc.c +#that defaults to v8 sparc . Code here is taken from my_rdtsc.h IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_SIZEOF_VOID_P EQUAL 4 AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc") SET(SOURCE diff --git a/cmake/os/WindowsCache.cmake b/cmake/os/WindowsCache.cmake index 0508ebcba84..0f6537765c2 100644 --- a/cmake/os/WindowsCache.cmake +++ b/cmake/os/WindowsCache.cmake @@ -25,7 +25,6 @@ SET(HAVE_ACCESS 1 CACHE INTERNAL "") SET(HAVE_ALARM CACHE INTERNAL "") SET(HAVE_ALLOCA_H CACHE INTERNAL "") SET(HAVE_ARPA_INET_H CACHE INTERNAL "") -SET(HAVE_ASM_MSR_H CACHE INTERNAL "") SET(HAVE_BACKTRACE CACHE INTERNAL "") SET(HAVE_BACKTRACE_SYMBOLS CACHE INTERNAL "") SET(HAVE_BACKTRACE_SYMBOLS_FD CACHE INTERNAL "") @@ -132,7 +131,6 @@ SET(HAVE_PTHREAD_YIELD_NP CACHE INTERNAL "") SET(HAVE_PTHREAD_YIELD_ZERO_ARG CACHE INTERNAL "") SET(HAVE_PUTENV 1 CACHE INTERNAL "") SET(HAVE_PWD_H CACHE INTERNAL "") -SET(HAVE_RDTSCLL CACHE INTERNAL "") SET(HAVE_READDIR_R CACHE INTERNAL "") SET(HAVE_READLINK CACHE INTERNAL "") SET(HAVE_READ_REAL_TIME CACHE INTERNAL "") |