Re: [PATCH v2 05/17] trace: energy_model: Add trace event for EM runtime modifications

From: Lukasz Luba
Date: Mon Jul 03 2023 - 11:53:31 EST




On 5/30/23 11:03, Dietmar Eggemann wrote:
On 12/05/2023 11:57, Lukasz Luba wrote:
The Energy Model (EM) supports runtime modifications. Track the changes
in order to do post-processing analysis. Don't use arrays in the trace
event, since they are not properly supported by the tools. Instead use
simple "unroll" with emitting the trace event for each EM array entry
with proper ID information. The older debugging mechanism which was
the simple debugfs which dumping the EM content won't be sufficient for
the modifiable EM purpose. This trace event mechanism would address the
needs.

Do we really need a full trace_event for this? Can we not follow the
task scheduler rule which says no new trace_events and use a trace_point
here? The footprint in the kernel would be so much smaller.

E.g. pelt_cfs_tp

0 sched.h 694 DECLARE_TRACE(pelt_cfs_tp,
1 core.c 106 EXPORT_TRACEPOINT_SYMBOL_GPL(pelt_cfs_tp);
2 fair.c 3937 trace_pelt_cfs_tp(cfs_rq);

And then this patch should be after the section with the functional changes.

[...]

I agree. I will change that approach and create tracepoint. Also, I'll
move it to the patch at the end of the functional changes.