Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1218782

Re: [PATCH 2/9] perf, tools, stat: Abstract stat metrics printing

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/9] perf, tools, stat: Abstract stat metrics printing
Date 2015-09-04 11:10 +0200
Message-ID <q4Vaq-60u-17@gated-at.bofh.it> (permalink)
References <q4pNf-32i-5@gated-at.bofh.it> <q4pNg-32i-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 2/9] perf, tools, stat: Abstract stat metrics printing Andi Kleen <andi@firstfloor.org> - 2015-09-03 01:40 +0200
  Re: [PATCH 2/9] perf, tools, stat: Abstract stat metrics printing Jiri Olsa <jolsa@redhat.com> - 2015-09-04 10:50 +0200
  Re: [PATCH 2/9] perf, tools, stat: Abstract stat metrics printing Jiri Olsa <jolsa@redhat.com> - 2015-09-04 11:10 +0200

csiph-web