lkml.org 
[lkml]   [2011]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCHv2 3/5] tracing, function: Fix trace header to follow context-info option
    Date
    The header display of function tracer does not follow
    the context-info option, so field names are displayed even
    if this option is off.

    Added check for TRACE_ITER_CONTEXT_INFO trace_flags.


    With following commands:
    # echo function > ./current_tracer
    # echo 0 > options/context-info
    # cat trace

    This is what it looked like before:
    # tracer: function
    #
    # TASK-PID CPU# TIMESTAMP FUNCTION
    # | | | | |
    add_preempt_count <-schedule
    rcu_note_context_switch <-schedule
    ...

    This is what it looks like now:
    # tracer: function
    #
    _raw_spin_unlock_irqrestore <-hrtimer_try_to_cancel
    ...


    Signed-off-by: Jiri Olsa <jolsa@redhat.com>
    ---
    kernel/trace/trace.c | 3 +++
    1 files changed, 3 insertions(+), 0 deletions(-)

    diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
    index ee9c921..01fc8d7 100644
    --- a/kernel/trace/trace.c
    +++ b/kernel/trace/trace.c
    @@ -2051,6 +2051,9 @@ void trace_default_header(struct seq_file *m)
    {
    struct trace_iterator *iter = m->private;

    + if (!(trace_flags & TRACE_ITER_CONTEXT_INFO))
    + return;
    +
    if (iter->iter_flags & TRACE_FILE_LAT_FMT) {
    /* print nothing if the buffers are empty */
    if (trace_empty(iter))
    --
    1.7.1


    \
     
     \ /
      Last update: 2011-06-03 17:01    [W:0.019 / U:61.656 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site