uarch-bench
uarch-bench copied to clipboard
libpfc timer should include kernel cycles too
Currently we are only getting user-mode cycles from libpfc. We should probably track all cycles.
Compare for example:
./uarch-bench.sh --test-name=syscall/* --timer=libpfc --extra-events=skl::UNHALTED_CORE_CYCLES
which gives:
** Running group syscall : Syscall benches **
Benchmark Cycles UNHALT
getuid() glibc call 48.00 706.69
getuid using syscall() 53.00 706.41
getpid using syscall() 53.00 726.17
close() on a non-existent FD 69.00 729.68
non-existent syscall 72.00 665.44
getuid direct syscall 41.00 699.77
non-existent direct syscall 41.00 631.84
syscall+lfence before 51.36 641.31
syscall+lfence after 52.32 644.63
back-to-back lfence 4.88 4.88
parallel-misses 16.93 16.96
mfenced misses 234.90 235.05
sfenced misses 17.18 17.20
lfenced misses 181.29 181.40
syscall misses 234.79 831.68
misses + lfence + syscall 244.98 835.93
Note how the Cycles
column is impossibly low, while the skl::UNHALTED_CORE_CYCLES
(UNHALT
) column shows the correct time.