[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b6e3ae17-ce41-2709-1a87-dcd9bd1f365a@linux.ibm.com>
Date: Tue, 21 Jan 2020 15:47:53 +0530
From: kajoljain <kjain@...ux.ibm.com>
To: Andi Kleen <ak@...ux.intel.com>
Cc: acme@...nel.org, mpe@...erman.id.au, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
anju@...ux.vnet.ibm.com, maddy@...ux.vnet.ibm.com,
ravi.bangoria@...ux.ibm.com, peterz@...radead.org,
yao.jin@...ux.intel.com, jolsa@...nel.org,
kan.liang@...ux.intel.com, jmario@...hat.com,
alexander.shishkin@...ux.intel.com, mingo@...nel.org,
paulus@...abs.org, namhyung@...nel.org, mpetlan@...hat.com,
gregkh@...uxfoundation.org, benh@...nel.crashing.org
Subject: Re: [RFC 5/6] perf/tools: Enhance JSON/metric infrastructure to
handle "?"
On 1/17/20 9:58 PM, Andi Kleen wrote:
> On Fri, Jan 17, 2020 at 06:16:19PM +0530, Kajol Jain wrote:
>> Patch enhances current metric infrastructure to handle "?" in the metric
>> expression. The "?" can be use for parameters whose value not known while
>> creating metric events and which can be replace later at runtime to
>> the proper value. It also add flexibility to create multiple events out
>> of single metric event added in json file.
> Please add a proper specification how this ? thing is supposed to work,
> what the exact semantics are, how it is different from the existing
> # mechanism etc.
>
> The standard way to do similar things before was to define an explicit
> # name and let the expr code take care of it.
Hi Andi,
Thanks for reviewing my patchset.
I did review the existing '#' mechanism. It is quiet useful for runtime
dependency (like ex. event selection based on a return value). But I want
to handle couple of more things. Meaning, filling in parameter of event code
based on runtime value and replicating events at runtime.
So the '?' can handle, 1) replacement of a value in the event code based
on runtime
and 2) replicate the event (metric expr) at runtime (handled in new
metricgroup__add_metric()).
This patchset add an arch specific function called
'arch_get_runtimeparam'. Ideally,
arch_get_runtimeparm() returns the number of metric exps one want to
create (it defaults to 1).
The loop added in 'metricgroup__add_metric' will handle the event addition.
Example ppc64 hv_24x7 pmu metric event using '?':
(hv_24x7@...MCS01_128B_RD_DISP_PORT01\\,chip\\=?@ +
hv_24x7@...MCS01_128B_RD_DISP_PORT23\\,chip\\=?@)
Here, '?' will be replaced with a runtime value and metric expression
will be replicated.
Thanks,
Kajol
> -Andi
Powered by blists - more mailing lists