proftest is a C application for testing the quality of different operating system APIs for profiling.
Usage:
make
# test setitimer
./proftest -i
# test timer_create
./proftest -c
Using docker:
./dev.bash
make && bpftrace -c './proftest -c' ./trace.bt
See the bottom of this twitter thread for the latest results. tl;dr: setitimer(2) seems pretty bad for profiling on Linux.