Skip to content

Commit 4fdd595

Browse files
committed
tracing: Do not stop recording comms if the trace file is being read
A while ago, when the "trace" file was opened, tracing was stopped, and code was added to stop recording the comms to saved_cmdlines, for mapping of the pids to the task name. Code has been added that only records the comm if a trace event occurred, and there's no reason to not trace it if the trace file is opened. Cc: [email protected] Fixes: 7ffbd48 ("tracing: Cache comms only after an event occurred") Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent 85550c8 commit 4fdd595

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

kernel/trace/trace.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,9 +2198,6 @@ struct saved_cmdlines_buffer {
21982198
};
21992199
static struct saved_cmdlines_buffer *savedcmd;
22002200

2201-
/* temporary disable recording */
2202-
static atomic_t trace_record_taskinfo_disabled __read_mostly;
2203-
22042201
static inline char *get_saved_cmdlines(int idx)
22052202
{
22062203
return &savedcmd->saved_cmdlines[idx * TASK_COMM_LEN];
@@ -3996,9 +3993,6 @@ static void *s_start(struct seq_file *m, loff_t *pos)
39963993
return ERR_PTR(-EBUSY);
39973994
#endif
39983995

3999-
if (!iter->snapshot)
4000-
atomic_inc(&trace_record_taskinfo_disabled);
4001-
40023996
if (*pos != iter->pos) {
40033997
iter->ent = NULL;
40043998
iter->cpu = 0;
@@ -4041,9 +4035,6 @@ static void s_stop(struct seq_file *m, void *p)
40414035
return;
40424036
#endif
40434037

4044-
if (!iter->snapshot)
4045-
atomic_dec(&trace_record_taskinfo_disabled);
4046-
40474038
trace_access_unlock(iter->cpu_file);
40484039
trace_event_read_unlock();
40494040
}

0 commit comments

Comments
 (0)