[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150904090030.GE12338@krava.redhat.com>
Date: Fri, 4 Sep 2015 11:00:30 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Andi Kleen <andi@...stfloor.org>
Cc: acme@...nel.org, jolsa@...nel.org, linux-kernel@...r.kernel.org,
Andi Kleen <ak@...ux.intel.com>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists