• Martin Storsjö's avatar
    aarch64: Use cntvct_el0 as timer register on Android and macOS · ab8f7030
    Martin Storsjö authored
    The default timer register pmccntr_el0 usually requires enabling
    access with e.g. a kernel module (while it is accessible by
    default on Windows). On Linux, the default for checkasm benchmarks
    is to use perf (if suitable headers are available) though.
    
    On macOS, using cntvct_el0 gives measurements with the same
    magnitude as mach_absolute_time (which is used currently), but
    possibly with a little less overhead/noise.
    Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
    ab8f7030
timer.h 1.66 KB