mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-23249: Support aarch64 architecture timer
aarch64 timer is available to userspace via arch register. clang's __builtin_readcyclecounter is wrong for aarch64 (reads the PMU cycle counter instead of the archi-timer register), so we don't use it. my_rdtsc unit-test on AWS m6g shows: frequency: 121830845 resolution: 1 overhead: 1 This counter is not strictly increasing, but it is non-decreasing.
This commit is contained in:
@@ -362,6 +362,8 @@ void my_timer_init(MY_TIMER_INFO *mti)
|
||||
mti->cycles.routine= MY_TIMER_ROUTINE_ASM_GCC_SPARC32;
|
||||
#elif defined(__GNUC__) && defined(__s390__)
|
||||
mti->cycles.routine= MY_TIMER_ROUTINE_ASM_S390;
|
||||
#elif defined(__GNUC__) && defined (__aarch64__)
|
||||
mti->cycles.routine= MY_TIMER_ROUTINE_AARCH64;
|
||||
#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
|
||||
mti->cycles.routine= MY_TIMER_ROUTINE_GETHRTIME;
|
||||
#else
|
||||
|
Reference in New Issue
Block a user