Skip to content

Commit 85550c8

Browse files
committed
tracing: Do not stop recording cmdlines when tracing is off
The saved_cmdlines is used to map pids to the task name, such that the output of the tracing does not just show pids, but also gives a human readable name for the task. If the name is not mapped, the output looks like this: <...>-1316 [005] ...2 132.044039: ... Instead of this: gnome-shell-1316 [005] ...2 132.044039: ... The names are updated when tracing is running, but are skipped if tracing is stopped. Unfortunately, this stops the recording of the names if the top level tracer is stopped, and not if there's other tracers active. The recording of a name only happens when a new event is written into a ring buffer, so there is no need to test if tracing is on or not. If tracing is off, then no event is written and no need to test if tracing is off or not. Remove the check, as it hides the names of tasks for events in the instance buffers. Cc: [email protected] Fixes: 7ffbd48 ("tracing: Cache comms only after an event occurred") Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent fb78076 commit 85550c8

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/trace/trace.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2486,8 +2486,6 @@ static bool tracing_record_taskinfo_skip(int flags)
24862486
{
24872487
if (unlikely(!(flags & (TRACE_RECORD_CMDLINE | TRACE_RECORD_TGID))))
24882488
return true;
2489-
if (atomic_read(&trace_record_taskinfo_disabled) || !tracing_is_on())
2490-
return true;
24912489
if (!__this_cpu_read(trace_taskinfo_save))
24922490
return true;
24932491
return false;

0 commit comments

Comments
 (0)