Re: [PATCH v2 14/19] perf, tools, stat: Support JSON metrics in perf stat

Jiri Olsa
2017-08-28T09:19:26Z

On Fri, Aug 11, 2017 at 04:26:29PM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> Add generic support for standalone metrics specified in JSON files
> to perf stat. A metric is a formula that uses multiple events
> to compute a higher level result (e.g. IPC).
>
> Previously metrics were always tied to an event and automatically
> enabled with that event. But now change it that we can have
> standalone metrics. They are in the same JSON data structure
> as events, but don't have an event name.
>
> We also allow to organize the metrics in metric groups, which
> allows a short cut to select several related metrics at once.
>
> Add a new -M / --metrics option to perf stat that adds the metrics
> or metric groups specified.
>
> Add the core code to manage and parse the metric groups. They
> are collected from the JSON data structures into a separate rblist.
> When computing shadow values look for metrics in that list.
> Then they are computed using the existing saved values infrastructure
> in stat-shadow.c
>
> The actual JSON metrics are in a separate pull request.

would need this for testing.. could you please put it somewhere?

thanks,
jirka