Re: [PATCH v14 19/19] fgraph: Skip recording calltime/rettime if it is not nneeded

From: Steven Rostedt
Date: Sat Sep 14 2024 - 17:53:47 EST


On Fri, 13 Sep 2024 00:11:38 +0900
"Masami Hiramatsu (Google)" <mhiramat@xxxxxxxxxx> wrote:

> From: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>
>
> Skip recording calltime and rettime if the fgraph_ops does not need it.
> This is a kind of performance optimization for fprobe. Since the fprobe
> user does not use these entries, recording timestamp in fgraph is just
> a overhead (e.g. eBPF, ftrace). So introduce the skip_timestamp flag,
> and all fgraph_ops sets this flag, skip recording calltime and rettime.
>
> Here is the performance results measured by
> tools/testing/selftests/bpf/benchs/run_bench_trigger.sh
>
> Without this:
> kprobe-multi : 5.700 ± 0.065M/s
> kretprobe-multi: 4.239 ± 0.006M/s
>
> With skip-timestamp:
> kprobe-multi : 6.265 ± 0.033M/s +9.91%
> kretprobe-multi: 4.758 ± 0.009M/s +12.24%
>
> Suggested-by: Jiri Olsa <olsajiri@xxxxxxxxx>
> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>

Can you try this series instead:

https://lore.kernel.org/all/20240914214805.779822616@xxxxxxxxxxx/

I rather get rid of the calltime completely from the generic logic, and
that series does just that.

That series only replaces this patch and can be applied before this
series (or after).

-- Steve