diff options
| author | Costa Shulyupin <[email protected]> | 2025-01-15 17:58:30 +0000 |
|---|---|---|
| committer | Steven Rostedt (Google) <[email protected]> | 2025-01-24 18:46:11 +0000 |
| commit | b91cfd9f75c02e7f4463f8416d99138630c4dfd0 (patch) | |
| tree | 9632b11c3b9019ffeb5a8766033840b51fe058b7 /mm/debug.c | |
| parent | rtla/timerlat_top: Set OSNOISE_WORKLOAD for kernel threads (diff) | |
| download | kernel-b91cfd9f75c02e7f4463f8416d99138630c4dfd0.tar.gz kernel-b91cfd9f75c02e7f4463f8416d99138630c4dfd0.zip | |
tools/rtla: Add osnoise_trace_is_off()
All of the users of trace_is_off() passes in &record->trace as the second
parameter, where record is a pointer to a struct osnoise_tool. This record
could be NULL and there is a hidden dependency that the trace field is the
first field to allow &record->trace to work with a NULL record pointer.
In order to make this code a bit more robust, as record shouldn't be
dereferenced if it is NULL, even if the code does work, create a new
function called osnoise_trace_is_off() that takes the pointer to a
struct osnoise_tool as its second parameter. This way it can properly test
if it is NULL before it dereferences it.
The old function trace_is_off() is removed and the function
osnoise_trace_is_off() is added into osnoise.c which is what the
struct osnoise_tool is associated with.
Cc: John Kacur <[email protected]>
Cc: "Luis Claudio R. Goncalves" <[email protected]>
Cc: Eder Zulian <[email protected]>
Cc: Dan Carpenter <[email protected]>
Cc: Tomas Glozar <[email protected]>
Cc: Gabriele Monaco <[email protected]>
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Costa Shulyupin <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'mm/debug.c')
0 files changed, 0 insertions, 0 deletions
