Re: [PATCH] tracing: Allow perf to read synthetic events

Steven Rostedt
2025-12-17T19:06:50Z

On Wed, 17 Dec 2025 10:58:25 -0800
Ian Rogers <irogers@google.com> wrote:

> This is great! Any chance of an example of using it? I'd like to add a test.

I tested it with:

# trace-cmd sqlhist -e -n futex_wait select TIMESTAMP_DELTA_USECS as lat from sys_enter_futex as start join sys_exit_futex as end on start.common_pid = end.common_pid
# perf record -e synthetic:futex_wait
# perf script
bash 1043 [002] 49.501707: synthetic:futex_wait: lat=8
in:imuxsock 610 [005] 58.904344: synthetic:futex_wait: lat=27
rs:main Q:Reg 612 [007] 58.904478: synthetic:futex_wait: lat=10847333
rs:main Q:Reg 612 [007] 58.904507: synthetic:futex_wait: lat=6
ls 1050 [004] 59.283561: synthetic:futex_wait: lat=8
in:imklog 611 [004] 69.084959: synthetic:futex_wait: lat=55
rs:main Q:Reg 612 [007] 69.085014: synthetic:futex_wait: lat=10180378
rs:main Q:Reg 612 [007] 69.085041: synthetic:futex_wait: lat=5

But feel free to use any other synthetic event or perf command.

-- Steve