From: John Garry <john.g.garry@oracle.com>
To: Ian Rogers <irogers@google.com>
Cc: acme@kernel.org, namhyung@kernel.org, jolsa@kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
renyu.zj@linux.alibaba.com, shangxiaojing@huawei.com,
kjain@linux.ibm.com, kan.liang@linux.intel.com
Subject: Re: [PATCH RFC 4/9] perf jevents: Add sys_events_find_events_table()
Date: Thu, 13 Jul 2023 16:06:46 +0100 [thread overview]
Message-ID: <297ddf04-9b35-7613-8efd-2857668b6835@oracle.com> (raw)
In-Reply-To: <CAP-5=fX+rz928LtFs2MWYUH=6Mcvz0XQcLRkO-n9BnVnX4RYWw@mail.gmail.com>
On 12/07/2023 18:52, Ian Rogers wrote:
>> To be crystal clear, when you say ">1 PMU", do you mean ">1 PMU instance
>> of the same type" or ">1 PMU type"?
> So I'm meaning that if you have a MetricExpr where the events are from
>> 1 PMU, for example memory bandwidth coming from uncore PMUs and then
> instructions from a core PMU, and you do something like a ratio
> between these two.
>
>> in a metric wouldn't work though as it would
>>> appear the event was missing. Having the metric specify the PMU avoids
>>> these problems, but is verbose.
>> The message I'm getting - correct me if I am wrong - is that you would
>> still prefer the PMU specified per event in metric expr, right? We don't
>> do that exactly for sys PMU metrics today - we specify "Unit" instead, like:
>>
>> MetricExpr: "sys_pmu_bar_event_foo1 + sys_pmu_bar_event_foo2"
>> Compat: "baz"
>> Unit:"sys_pmu_bar"
>>
>> And so you prefer something like the following, right?
>> MetricExpr: "sys_pmu_foo@bar1@ + sys_pmu_foo@bar2@"
>>
>> If so, I think that is ok - I just want to get rid of Unit and Compat.
> I think we're agreeing 😄
Ok, fine. I need to check on implementing support for that.
Then would you have any idea for testing here?
What I do is to ensure that if we 2x tables like following for separate
SoCs:
soc_a.json
{
"MetricExpr": "pmu_unit@event_foo@ * pmu_unit@event_bar@ * 1",
"MetricName": "metric_baz",
},
{
"EventCode": "0x84",
"EventName": "event_foo ",
"Compat": "0x00000030",
"Unit": "pmu_unit"
},
{
"EventCode": "0x85",
"EventName": "event_bar ",
"Compat": "0x00000030",
"Unit": "pmu_unit"
},
soc_b.json
{
"MetricExpr": "pmu_unit@event_foo@ * pmu_unit@event_bar@ * 2",
"MetricName": "metric_baz",
},
{
"EventCode": "0x84",
"EventName": "event_foo ",
"Compat": "0x00000040",
"Unit": "pmu_unit"
},
{
"EventCode": "0x85",
"EventName": "event_bar ",
"Compat": "0x00000040",
"Unit": "pmu_unit"
},
And we have a pmu with name and hw id matching "pmu_unit" and
"0x00000040" present, that we select metric metric_baz for soc_b
>I think Unit may be useful, say on Intel
> hybrid I want the tma_fround_bound metric on just cpu_atom. Currently
> the use of Unit is messy for metrics, ie uncore metrics are associated
> with core PMUs, and what to do with a MetricExpr with >1 PMU. I think
> we're learning from trying. I'm just hoping the migration to a sysfs
> style layout will still be possible, as I can see lots of upside in
> terms of testing, 1 approach, etc.
Do you have an RFC or something for this "sysfs style layout"? I think
that it would be easier for me to understand your idea by seeing the SW.
Thanks,
John
next prev parent reply other threads:[~2023-07-13 15:08 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 10:29 [PATCH RFC 0/9] perf tool: sys event metric support re-write John Garry
2023-06-28 10:29 ` [PATCH RFC 1/9] perf metrics: Delete metricgroup_add_iter_data.table John Garry
2023-06-30 17:22 ` Ian Rogers
2023-06-28 10:29 ` [PATCH RFC 2/9] perf metrics: Don't iter sys metrics if we already found a CPU match John Garry
2023-06-30 17:41 ` Ian Rogers
2023-07-03 13:09 ` John Garry
2023-07-12 5:40 ` Ian Rogers
2023-07-12 9:37 ` John Garry
2023-06-28 10:29 ` [PATCH RFC 3/9] perf metrics: Pass cpu and sys tables to metricgroup__add_metric() John Garry
2023-06-30 18:39 ` Ian Rogers
2023-07-03 15:20 ` John Garry
2023-06-28 10:29 ` [PATCH RFC 4/9] perf jevents: Add sys_events_find_events_table() John Garry
2023-06-30 19:00 ` Ian Rogers
2023-06-30 20:16 ` Ian Rogers
2023-07-03 15:15 ` John Garry
2023-07-12 6:05 ` Ian Rogers
2023-07-12 10:55 ` John Garry
2023-07-12 17:52 ` Ian Rogers
2023-07-13 15:06 ` John Garry [this message]
2023-07-13 21:35 ` Ian Rogers
2023-07-14 11:58 ` John Garry
2023-07-14 15:55 ` Ian Rogers
2023-07-17 7:41 ` John Garry
2023-07-17 21:39 ` Ian Rogers
2023-07-18 9:32 ` John Garry
2023-07-19 15:25 ` Ian Rogers
2023-07-19 15:36 ` John Garry
2023-07-19 15:49 ` Ian Rogers
2023-07-19 20:07 ` Arnaldo Carvalho de Melo
2023-06-28 10:29 ` [PATCH RFC 5/9] perf pmu: Refactor pmu_add_sys_aliases_iter_fn() John Garry
2023-06-28 10:29 ` [PATCH RFC 6/9] perf metrics: Add metricgroup_sys_metric_supported() John Garry
2023-06-28 10:29 ` [PATCH RFC 7/9] perf metrics: Test metric match in metricgroup__sys_event_iter() John Garry
2023-06-28 10:29 ` [PATCH RFC 8/9] perf metrics: Stop metricgroup__add_metric_sys_event_iter if already matched John Garry
2023-06-28 10:29 ` [PATCH RFC 9/9] perf vendor events arm64: Remove unnecessary metric Unit and Compat specifiers John Garry
2023-06-29 22:08 ` [PATCH RFC 0/9] perf tool: sys event metric support re-write Namhyung Kim
2023-06-30 9:35 ` John Garry
2023-06-30 21:07 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=297ddf04-9b35-7613-8efd-2857668b6835@oracle.com \
--to=john.g.garry@oracle.com \
--cc=acme@kernel.org \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=kjain@linux.ibm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=renyu.zj@linux.alibaba.com \
--cc=shangxiaojing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®