When using the perf
tool (Linux), is there any simple and convenient way to time durations between two tracepoints?
The obvious use is for syscall sys_enter
and sys_exit
points like sys_enter_fsync
and sys_enter_fsync
. But I'm also interested in both dynamic and statically defined tracepoints as supported by perf probe
. Think "duration between PostgreSQL's transaction__start
and either transaction__commit
or transaction__abort
".
Ideally a way to use the info in perf timechart
and/or aggregate it in perf stat
.
Is the only option to use tools like DTrace or SystemTap? Or ebpf maybe? Or am I missing something in perf
's docs? How to time between two tracepoints, report durations, etc?