Messages in this thread | | | Date | Thu, 30 Jul 2015 15:42:34 +0200 | From | Jiri Olsa <> | Subject | Re: [PATCH 2/4] perf, tools, stat: Abstract stat metrics printing |
| |
On Wed, Jul 29, 2015 at 05:21:38PM -0700, Andi Kleen wrote:
SNIP
> +static void nsec_printout(int id, int nr, struct perf_evsel *evsel, double avg, > + void *ctx, print_metric_t print_metric) > { > double msecs = avg / 1e6; > const char *fmt_v, *fmt_n; > @@ -647,13 +689,16 @@ static void nsec_printout(int id, int nr, struct perf_evsel *evsel, double avg) > return; > > if (perf_evsel__match(evsel, SOFTWARE, SW_TASK_CLOCK)) > - fprintf(output, " # %8.3f CPUs utilized ", > - avg / avg_stats(&walltime_nsecs_stats)); > + print_metric(ctx, NULL, "%8.3f", "CPUs utilized", > + avg / avg_stats(&walltime_nsecs_stats)); > else > - fprintf(output, " "); > + print_metric(ctx, NULL, NULL, NULL, 0); > }
hum, this should go to perf_stat__print_shadow_stats, could you please move it there before this patch?
thanks, jirka
| |