The RISC-V implementation of `cycleclock::Now` uses the user-space `rdcycle` instruction to query how many cycles have happened since the core started. The only complexity here is on 32-bit RISC-V, where `rdcycle` can only read the lower 32 bits of the 64-bit hardware counter. In this case, `rdcycleh` reads the higher 32 bits of the counter. We match the powerpc implementation to detect and correct for overflow in the high bits.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| CMakeLists.txt | Loading commit data... | |
| arraysize.h | Loading commit data... | |
| benchmark.cc | Loading commit data... | |
| benchmark_api_internal.cc | Loading commit data... | |
| benchmark_api_internal.h | Loading commit data... | |
| benchmark_main.cc | Loading commit data... | |
| benchmark_name.cc | Loading commit data... | |
| benchmark_register.cc | Loading commit data... | |
| benchmark_register.h | Loading commit data... | |
| benchmark_runner.cc | Loading commit data... | |
| benchmark_runner.h | Loading commit data... | |
| check.h | Loading commit data... | |
| colorprint.cc | Loading commit data... | |
| colorprint.h | Loading commit data... | |
| commandlineflags.cc | Loading commit data... | |
| commandlineflags.h | Loading commit data... | |
| complexity.cc | Loading commit data... | |
| complexity.h | Loading commit data... | |
| console_reporter.cc | Loading commit data... | |
| counter.cc | Loading commit data... | |
| counter.h | Loading commit data... | |
| csv_reporter.cc | Loading commit data... | |
| cycleclock.h | Loading commit data... | |
| internal_macros.h | Loading commit data... | |
| json_reporter.cc | Loading commit data... | |
| log.h | Loading commit data... | |
| mutex.h | Loading commit data... | |
| re.h | Loading commit data... | |
| reporter.cc | Loading commit data... | |
| sleep.cc | Loading commit data... | |
| sleep.h | Loading commit data... | |
| statistics.cc | Loading commit data... | |
| statistics.h | Loading commit data... | |
| string_util.cc | Loading commit data... | |
| string_util.h | Loading commit data... | |
| sysinfo.cc | Loading commit data... | |
| thread_manager.h | Loading commit data... | |
| thread_timer.h | Loading commit data... | |
| timers.cc | Loading commit data... | |
| timers.h | Loading commit data... |