Re: [RFC 00/10] perf tools: Add support to reuse metric

2020-06-29 Thread Andi Kleen
> I'm guessing that those metric JSONs are human generated, so would be > suitable; unlike the regular JSONs, which are automated. The x86 metrics are auto generated too. That's why you see the repetition. -Andi

Re: [RFC 00/10] perf tools: Add support to reuse metric

2020-06-29 Thread Michael Petlan
On Fri, 26 Jun 2020, Andi Kleen wrote: > > The name could be a metric or an event, the logic for each is quite > > I would say collisions are unlikely. Event names follow quite structured > patterns. But across various architectures? I guess event names can be arbitrary. In perftool-testsuite, I

Re: [RFC 00/10] perf tools: Add support to reuse metric

2020-06-28 Thread Jiri Olsa
On Sat, Jun 27, 2020 at 09:48:21AM -0300, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 26, 2020 at 02:57:59PM -0700, Andi Kleen escreveu: > > > The name could be a metric or an event, the logic for each is quite > > > > I would say collisions are unlikely. Event names follow quite structured > >

Re: [RFC 00/10] perf tools: Add support to reuse metric

2020-06-27 Thread Ian Rogers
On Sat, Jun 27, 2020 at 5:48 AM Arnaldo Carvalho de Melo wrote: > > Em Fri, Jun 26, 2020 at 02:57:59PM -0700, Andi Kleen escreveu: > > > The name could be a metric or an event, the logic for each is quite > > > > I would say collisions are unlikely. Event names follow quite structured > > patterns

Re: [RFC 00/10] perf tools: Add support to reuse metric

2020-06-27 Thread Arnaldo Carvalho de Melo
Em Fri, Jun 26, 2020 at 02:57:59PM -0700, Andi Kleen escreveu: > > The name could be a metric or an event, the logic for each is quite > > I would say collisions are unlikely. Event names follow quite structured > patterns. And when introducing a new metric the build process can detect that clash

Re: [RFC 00/10] perf tools: Add support to reuse metric

2020-06-27 Thread Arnaldo Carvalho de Melo
Em Fri, Jun 26, 2020 at 02:44:14PM -0700, Ian Rogers escreveu: > On Fri, Jun 26, 2020 at 2:25 PM Andi Kleen wrote: > > On Fri, Jun 26, 2020 at 09:47:10PM +0200, Jiri Olsa wrote: > > > this patchset is adding the support to reused metric in another > > > metric. The metric needs to be referenced by

Re: [RFC 00/10] perf tools: Add support to reuse metric

2020-06-27 Thread John Garry
On 26/06/2020 20:47, Jiri Olsa wrote: hi, this patchset is adding the support to reused metric in another metric. The metric needs to be referenced by 'metric:' prefix. I notice that there is much repetition in the x86 metric JSONs between CPUs. So I know it's not the same as what you propose

Re: [RFC 00/10] perf tools: Add support to reuse metric

2020-06-26 Thread Andi Kleen
> The name could be a metric or an event, the logic for each is quite I would say collisions are unlikely. Event names follow quite structured patterns. > different. You could look up an event and when it fails assume it was > a metric, but I like the simplicity of this approach. I don't think i

Re: [RFC 00/10] perf tools: Add support to reuse metric

2020-06-26 Thread Ian Rogers
On Fri, Jun 26, 2020 at 2:25 PM Andi Kleen wrote: > > On Fri, Jun 26, 2020 at 09:47:10PM +0200, Jiri Olsa wrote: > > hi, > > this patchset is adding the support to reused metric in another > > metric. The metric needs to be referenced by 'metric:' prefix. > > Why is the prefix needed? > > Could ju

Re: [RFC 00/10] perf tools: Add support to reuse metric

2020-06-26 Thread Andi Kleen
On Fri, Jun 26, 2020 at 09:47:10PM +0200, Jiri Olsa wrote: > hi, > this patchset is adding the support to reused metric in another > metric. The metric needs to be referenced by 'metric:' prefix. Why is the prefix needed? Could just look it up without prefix. -Andi

[RFC 00/10] perf tools: Add support to reuse metric

2020-06-26 Thread Jiri Olsa
hi, this patchset is adding the support to reused metric in another metric. The metric needs to be referenced by 'metric:' prefix. For example, to define IPC by using CPI with change like: "BriefDescription": "Instructions Per Cycle (per Logical Processor)", - "MetricExpr": "INST