Re: [RFC PATCH 1/1] smp: Add tracepoints for functions called with smp_call_function*()

From: Steven Rostedt
Date: Thu Apr 06 2023 - 09:50:03 EST


On Thu, 06 Apr 2023 05:42:13 -0300
Leonardo Brás <leobras@xxxxxxxxxx> wrote:

> Hello Sebastian, thanks for the heads up!
>
> IIUC Valentin is adding/improving tracepoints that are collected in the
> requesting CPU, at the moment of scheduling the IPI, which are also useful.
>
> But on my scenario, would be nice to actually have the information on the time
> window in which the requested function is running in the requested CPU. 
>

Well once you know the functions that are being called (running your test
case with the IPI trace events), then you can get the timings of those same
functions by:

# cd /sys/kernel/tracing
# echo '<space-delimited-list-of-functions>' > set_ftrace_filter
# echo function_graph > current_tracer

Then the function graph will give you those timings.

-- Steve