lkml.org 
[lkml]   [2015]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/9] perf, tools, stat: Abstract stat metrics printing
    On Wed, Sep 02, 2015 at 04:35:47PM -0700, Andi Kleen wrote:

    SNIP

    > diff --git a/tools/perf/util/stat.h b/tools/perf/util/stat.h
    > index 62448c8..bb07e46 100644
    > --- a/tools/perf/util/stat.h
    > +++ b/tools/perf/util/stat.h
    > @@ -67,11 +67,21 @@ void perf_stat_evsel_id_init(struct perf_evsel *evsel);
    >
    > extern struct stats walltime_nsecs_stats;
    >
    > +typedef void (*print_metric_t)(void *ctx, const char *color, const char *unit,
    > + const char *fmt, double val);
    > +
    > void perf_stat__reset_shadow_stats(void);
    > void perf_stat__update_shadow_stats(struct perf_evsel *counter, u64 *count,
    > int cpu);
    > -void perf_stat__print_shadow_stats(FILE *out, struct perf_evsel *evsel,
    > - double avg, int cpu, enum aggr_mode aggr);
    > +struct perf_stat_output_ctx {
    > + void *ctx;
    > + print_metric_t print_metric;
    > + void (*new_line)(void *ctx);

    please add typedef for new_line as well

    jirka


    \
     
     \ /
      Last update: 2015-09-04 11:21    [W:3.246 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site