diff options
Diffstat (limited to 'mysys/my_rdtsc.c')
-rw-r--r-- | mysys/my_rdtsc.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/mysys/my_rdtsc.c b/mysys/my_rdtsc.c index 028c7f810d4..ad11e8c6a6c 100644 --- a/mysys/my_rdtsc.c +++ b/mysys/my_rdtsc.c @@ -129,6 +129,31 @@ ulonglong my_timer_cycles_il_x86_64(); clock_gettime(CLOCK_SGI_CYCLE) for Irix platforms, or on read_real_time for aix platforms. There is nothing for Alpha platforms, they would be tricky. + + On the platforms that do not have a CYCLE timer, + "wait" events are initialized to use NANOSECOND instead of CYCLE + during performance_schema initialization (at the server startup). + + Linux performance monitor (see "man perf_event_open") can + provide cycle counter on the platforms that do not have + other kinds of cycle counters. But we don't use it so far. + + ARM notes + --------- + During tests on ARMv7 Debian, perf_even_open() based cycle counter provided + too low frequency with too high overhead: + MariaDB [performance_schema]> SELECT * FROM performance_timers; + +-------------+-----------------+------------------+----------------+ + | TIMER_NAME | TIMER_FREQUENCY | TIMER_RESOLUTION | TIMER_OVERHEAD | + +-------------+-----------------+------------------+----------------+ + | CYCLE | 689368159 | 1 | 970 | + | NANOSECOND | 1000000000 | 1 | 308 | + | MICROSECOND | 1000000 | 1 | 417 | + | MILLISECOND | 1000 | 1000 | 407 | + | TICK | 127 | 1 | 612 | + +-------------+-----------------+------------------+----------------+ + Therefore, it was decided not to use perf_even_open() on ARM + (i.e. go without CYCLE and have "wait" events use NANOSECOND by default). */ ulonglong my_timer_cycles(void) |