From: James Clark <james.clark@arm.com>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Kan Liang <kan.liang@linux.intel.com>,
Ravi Bangoria <ravi.bangoria@amd.com>,
Yang Jihong <yangjihong@bytedance.com>,
Ze Gao <zegao2021@gmail.com>, Leo Yan <leo.yan@linux.dev>,
Song Liu <song@kernel.org>,
K Prateek Nayak <kprateek.nayak@amd.com>, Kaige Ye <ye@kaige.org>,
Yicong Yang <yangyicong@hisilicon.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/5] perf stat: Remove evlist__add_default_attrs use strings
Date: Thu, 30 May 2024 13:22:25 +0100 [thread overview]
Message-ID: <053b7aad-5c30-48d3-894e-d4db98440191@arm.com> (raw)
In-Reply-To: <CAP-5=fXxsFp9tynNhkYqrgCMtP4F-XaADz+06hTWHHFVpVhfDg@mail.gmail.com>
On 29/05/2024 19:18, Ian Rogers wrote:
> On Wed, May 29, 2024 at 10:39 AM Ian Rogers <irogers@google.com> wrote:
>>
>> On Wed, May 29, 2024 at 8:39 AM James Clark <james.clark@arm.com> wrote:
>>>
>>>
>>>
>>> On 10/05/2024 06:37, Ian Rogers wrote:
>>>> add_default_atttributes would add evsels by having pre-created
>>>> perf_event_attr, however, this needed fixing for hybrid as the
>>>> extended PMU type was necessary for each core PMU. The logic for this
>>>> was in an arch specific x86 function and wasn't present for ARM,
>>>> meaning that default events weren't being opened on all PMUs on
>>>> ARM. Change the creation of the default events to use parse_events and
>>>> strings as that will open the events on all PMUs.
>>>>
>>>> Rather than try to detect events on PMUs before parsing, parse the
>>>> event but skip its output in stat-display.
>>>>
>>>> The previous order of hardware events was: cycles,
>>>> stalled-cycles-frontend, stalled-cycles-backend, instructions. As
>>>> instructions is a more fundamental concept the order is changed to:
>>>> instructions, cycles, stalled-cycles-frontend, stalled-cycles-backend.
>>>>
>>>> Closes: https://lore.kernel.org/lkml/CAP-5=fVABSBZnsmtRn1uF-k-G1GWM-L5SgiinhPTfHbQsKXb_g@mail.gmail.com/
>>>
>>> Taking a look at this one now. I think some example commands and outputs
>>> in the commit message would be helpful because there are quite a few
>>> different things mentioned in the closes link.
>>>
>>> But I'm assuming this is just for the command without specifying an event:
>>>
>>> $ perf stat
>>>
>>> I didn't realise that wasn't working properly and I'd missed that Mark
>>> spotted it in that link.
>>
>> Hi James,
>>
>> Do you want to take on owning fixing this? My concern is that by using
>> event parsing:
>>
>> + "context-switches,"
>> + "cpu-migrations,"
>> + "page-faults,"
>> + "instructions,"
>> + "cycles,"
>> + "stalled-cycles-frontend,"
>> + "stalled-cycles-backend,"
>> + "branches,"
>> + "branch-misses",
>>
>> any of the names could conflict with something advertised on an ARM
>> PMU somewhere. Clearly cycles has already proved to be controversial
>> and broken for perf record on Neoverse.
>
> Oh and these events are also broken on ARM M? PMUs with the revert
> that's in v6.10, so I don't know how to go about fixing this.
>
> Thanks,
> Ian
I'll take it yep. But the fix probably needs to take into context
whatever else we decide with the other issue. Conflicting names might
not actually be an issue if we work around that with the other change.
But I'm still getting up to speed with the other one.
James
next prev parent reply other threads:[~2024-05-30 12:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 5:37 [PATCH v3 0/5] Event parsing fixes Ian Rogers
2024-05-10 5:37 ` [PATCH v3 1/5] perf evsel: Add alternate_hw_config and use in evsel__match Ian Rogers
2024-05-10 5:37 ` [PATCH v3 2/5] perf stat: Uniquify event name improvements Ian Rogers
2024-05-10 5:37 ` [PATCH v3 3/5] perf stat: Remove evlist__add_default_attrs use strings Ian Rogers
2024-05-29 15:39 ` James Clark
2024-05-29 17:39 ` Ian Rogers
2024-05-29 18:18 ` Ian Rogers
2024-05-30 12:22 ` James Clark [this message]
2024-05-10 5:37 ` [PATCH v3 4/5] perf evsel x86: Make evsel__has_perf_metrics work for legacy events Ian Rogers
2024-05-10 5:37 ` [PATCH v3 5/5] perf evsel: Remove pmu_name Ian Rogers
2024-05-14 4:48 ` [PATCH v3 0/5] Event parsing fixes Ian Rogers
2024-05-21 20:48 ` Ian Rogers
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=053b7aad-5c30-48d3-894e-d4db98440191@arm.com \
--to=james.clark@arm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=kprateek.nayak@amd.com \
--cc=leo.yan@linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@amd.com \
--cc=song@kernel.org \
--cc=yangjihong@bytedance.com \
--cc=yangyicong@hisilicon.com \
--cc=ye@kaige.org \
--cc=zegao2021@gmail.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®