lkml.org 
[lkml]   [2018]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 5/7] tracing: Move hist trigger key printing into a separate function
    Date
    From: Tom Zanussi <tom.zanussi@linux.intel.com>

    Future patches will want to print a histogram key outside a histogram
    - add and use hist_trigger_print_key() for that purpose.

    Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
    ---
    kernel/trace/trace_events_hist.c | 19 +++++++++++++++----
    1 file changed, 15 insertions(+), 4 deletions(-)

    diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
    index c2c555c89c06..520bfa597981 100644
    --- a/kernel/trace/trace_events_hist.c
    +++ b/kernel/trace/trace_events_hist.c
    @@ -4861,10 +4861,10 @@ static void hist_trigger_stacktrace_print(struct seq_file *m,
    }
    }

    -static void
    -hist_trigger_entry_print(struct seq_file *m,
    - struct hist_trigger_data *hist_data, void *key,
    - struct tracing_map_elt *elt)
    +static void hist_trigger_print_key(struct seq_file *m,
    + struct hist_trigger_data *hist_data,
    + void *key,
    + struct tracing_map_elt *elt)
    {
    struct hist_field *key_field;
    char str[KSYM_SYMBOL_LEN];
    @@ -4940,6 +4940,17 @@ hist_trigger_entry_print(struct seq_file *m,
    seq_puts(m, " ");

    seq_puts(m, "}");
    +}
    +
    +static void hist_trigger_entry_print(struct seq_file *m,
    + struct hist_trigger_data *hist_data,
    + void *key,
    + struct tracing_map_elt *elt)
    +{
    + const char *field_name;
    + unsigned int i;
    +
    + hist_trigger_print_key(m, hist_data, key, elt);

    seq_printf(m, " hitcount: %10llu",
    tracing_map_read_sum(elt, HITCOUNT_IDX));
    --
    2.14.1
    \
     
     \ /
      Last update: 2018-08-09 16:35    [W:4.704 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site