From: "Liang, Kan" <kan.liang@linux.intel.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>,
James Clark <james.clark@arm.com>,
Yang Jihong <yangjihong1@huawei.com>, Kaige Ye <ye@kaige.org>,
Yicong Yang <yangyicong@hisilicon.com>,
K Prateek Nayak <kprateek.nayak@amd.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] perf stat: Remove evlist__add_default_attrs use strings
Date: Tue, 9 Apr 2024 12:00:00 -0400 [thread overview]
Message-ID: <cd4b5229-b938-44ef-822a-68d29c463aa7@linux.intel.com> (raw)
In-Reply-To: <CAP-5=fU=bEvzWw+62HxL=5kOSqQxaBYeDBomv8Fdu+R+fNv5sw@mail.gmail.com>
On 2024-04-09 11:20 a.m., Ian Rogers wrote:
>>> + ret = parse_events(evlist,
>>> + "context-switches,"
>>> + "cpu-migrations,"
>>> + "page-faults,"
>>> + "instructions,"
>>> + "cycles,"
>> "cycles",
>> "instructions",
>>
>> It's better to keep the original order.
> So the original order was:
> "cycles,"
> "stalled-cycles-frontend,"
> "stalled-cycles-backend,"
> "instructions"
>
Right. The stalled-* events are added between default_attrs0 and
default_attrs1.
> but many/most/all core PMUs don't provide the stalled-* events. At the
> programmer level instructions is the most fundamental thing, so having
> it last felt wrong hence moving it to be the first after the software
> events. My thought was, if we're going to reorder things then let's
> not do a half measure like:
> "cycles,"
> "instructions,"
> "stalled-cycles-frontend,"
> "stalled-cycles-backend"
>
> let's just put things into their best order. It is obviously easy to
> change but having this way wasn't an accident. There's obviously
> subjectivity about whether cycles is more fundamental than
> instructions, my thought is that you get taught instructions first and
> that these take some number of cycles to execute, hence thinking
> instructions should have some priority in the output over cycles -
> some people may not even know what cycles means, it is hard enough
> when you do given the variety of different clocks 🙂
>
My concern is that there may be someone who still relies on the std
output of perf stat default. So the output format/order matters for
them. Their scripts probably be broken if the order is changed.
Thanks,
Kan
next prev parent reply other threads:[~2024-04-09 16:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-06 7:38 [PATCH v1] perf stat: Remove evlist__add_default_attrs use strings Ian Rogers
2024-04-09 14:40 ` Liang, Kan
2024-04-09 15:20 ` Ian Rogers
2024-04-09 16:00 ` Liang, Kan [this message]
2024-04-09 16:04 ` Ian Rogers
2024-04-09 18:50 ` Liang, Kan
2024-04-09 20:38 ` 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=cd4b5229-b938-44ef-822a-68d29c463aa7@linux.intel.com \
--to=kan.liang@linux.intel.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=jolsa@kernel.org \
--cc=kprateek.nayak@amd.com \
--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=yangjihong1@huawei.com \
--cc=yangyicong@hisilicon.com \
--cc=ye@kaige.org \
/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;
as well as URLs for NNTP newsgroup(s).