[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170209113937.GA7455@krava>
Date: Thu, 9 Feb 2017 12:39:37 +0100
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 10/10] perf, tools, stat: Output JSON MetricExpr metric
On Wed, Feb 08, 2017 at 01:51:05PM -0800, Andi Kleen wrote:
SNIP
> >
> > could you show an example of the MetricExpr?
>
> It's in the event list branch
>
> https://git.kernel.org/cgit/linux/kernel/git/ak/linux-misc.git/log/?h=perf/intel-uncore-json-files-3
>
> All the metrics currently do is just the same as DividedBy earlier:
> generate a percentage out of a count, typically based on clock ticks.
>
> + "MetricExpr": "(UNC_M_POWER_CHANNEL_PPD / UNC_M_CLOCKTICKS) *
> 100.",
>
>
>
> >
> > it's part of the event record, what if you wanted to have 2 or more metrics defined for event?
>
> Would need multiple copies of the event.
this ...
>
> >
> > who defines those expressions?
>
> It's metrics used internally by Intel.
>
> >
> > what if you dont provide the necessary events needed for the expression?
>
> Then perf prints a warning suggesting the events.
>
> It's currently a TODO to add them automatically. Could be added,
> but the patch was already complex, so I didn't add it.
>
> It's somewhat complicated because you would need to avoid
> duplicates and have to handle groups correctly. perf stat
> doesn't have the necessarily knowledge to fully understand
> the constraints on groups.
>
> Then the extra event may not fit into the group, and it seemed
> saner to let the user decide what to do then, instead of
> generating a possible unschedulable group.
>
> So it's not that easy to do it automatically.
and this makes me think, that this is not the right approach
adding extra copy of an event when you want to add new expression?
why can't we have another list/file of those expressions
from which point we could point and configure events we need
jirka
Powered by blists - more mailing lists