lkml.org 
[lkml]   [2021]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 56/90] tracing: Do not stop recording comms if the trace file is being read
    Date
    From: Steven Rostedt (VMware) <rostedt@goodmis.org>

    commit 4fdd595e4f9a1ff6d93ec702eaecae451cfc6591 upstream.

    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: stable@vger.kernel.org
    Fixes: 7ffbd48d5cab2 ("tracing: Cache comms only after an event occurred")
    Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    kernel/trace/trace.c | 9 ---------
    1 file changed, 9 deletions(-)

    --- a/kernel/trace/trace.c
    +++ b/kernel/trace/trace.c
    @@ -1948,9 +1948,6 @@ struct saved_cmdlines_buffer {
    };
    static struct saved_cmdlines_buffer *savedcmd;

    -/* temporary disable recording */
    -static atomic_t trace_record_taskinfo_disabled __read_mostly;
    -
    static inline char *get_saved_cmdlines(int idx)
    {
    return &savedcmd->saved_cmdlines[idx * TASK_COMM_LEN];
    @@ -3458,9 +3455,6 @@ static void *s_start(struct seq_file *m,
    return ERR_PTR(-EBUSY);
    #endif

    - if (!iter->snapshot)
    - atomic_inc(&trace_record_taskinfo_disabled);
    -
    if (*pos != iter->pos) {
    iter->ent = NULL;
    iter->cpu = 0;
    @@ -3503,9 +3497,6 @@ static void s_stop(struct seq_file *m, v
    return;
    #endif

    - if (!iter->snapshot)
    - atomic_dec(&trace_record_taskinfo_disabled);
    -
    trace_access_unlock(iter->cpu_file);
    trace_event_read_unlock();
    }

    \
     
     \ /
      Last update: 2021-06-21 18:20    [W:5.646 / U:0.348 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site