From: Linus Torvalds <torvalds@linux-foundation.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ian Rogers <irogers@google.com>, Leo Yan <leo.yan@linux.dev>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
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>,
James Clark <james.clark@arm.com>,
Dominique Martinet <asmadeus@codewreck.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] perf evlist: Force adding default events only to core PMUs
Date: Tue, 28 May 2024 13:00:12 -0700 [thread overview]
Message-ID: <CAHk-=wg3TciVzg7To1KVueCmwJoDEZZSurGPb+a7Dn7Dij=4YQ@mail.gmail.com> (raw)
In-Reply-To: <ZlY0F_lmB37g10OK@x1>
On Tue, 28 May 2024 at 12:44, Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> For 'perf record' we're asking for sampling, if the event has the name
> specified and can't be sampled, skip it, warn the user and even so
> only if verbose mode is asked, something like:
Yes. I think that's the right rule in general.
However, the more I have looked at this case, the more I am also
convinced that "cycles" as a name is special.
It's literally documented to be an alias for cpu-cycles, both in
examples and in "perf list" output, and that's what the usage is.
So even if you were to have some other PMU in the system that had a
"cycles" thing, if it's not a core event but some other cycles
("uncore", bus cycles, bicycles, whatever), it shouldn't be used even
if it could be used for profiling.
You'd have to use the full PMU name and actually list it out if you
want to use a non-core counter named "cycles".
And yes, we even have some documentation that says exactly that:
"e.g usage::
perf stat -a -e arm_dsu_0/cycles/"
So this isn't even anything new or ambiguous. This is just how things
*ARE*, and absolutely have to be.
Linus
prev parent reply other threads:[~2024-05-28 20:00 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-25 15:29 [PATCH v1] perf evlist: Force adding default events only to core PMUs Ian Rogers
2024-05-25 16:43 ` Linus Torvalds
2024-05-25 21:14 ` Linus Torvalds
2024-05-27 10:58 ` Leo Yan
2024-05-28 5:36 ` Ian Rogers
2024-05-28 17:00 ` Linus Torvalds
2024-05-28 17:39 ` Ian Rogers
2024-05-28 18:12 ` Linus Torvalds
2024-05-28 18:58 ` Ian Rogers
2024-05-28 19:42 ` Linus Torvalds
2024-05-28 20:03 ` Ian Rogers
2024-05-28 20:33 ` Linus Torvalds
2024-05-28 21:37 ` Ian Rogers
2024-05-28 21:42 ` Linus Torvalds
2024-05-28 19:44 ` Arnaldo Carvalho de Melo
2024-05-28 19:51 ` Ian Rogers
2024-05-29 14:50 ` James Clark
2024-05-29 17:33 ` Ian Rogers
2024-05-30 15:37 ` James Clark
2024-05-30 16:14 ` Ian Rogers
2024-05-29 18:44 ` Arnaldo Carvalho de Melo
2024-05-29 19:25 ` Ian Rogers
2024-05-30 5:35 ` Namhyung Kim
2024-05-30 12:48 ` James Clark
2024-05-30 13:46 ` Ian Rogers
2024-05-30 22:51 ` Namhyung Kim
2024-06-05 20:29 ` Namhyung Kim
2024-06-05 23:02 ` Ian Rogers
2024-06-06 7:09 ` Namhyung Kim
2024-06-06 9:42 ` James Clark
2024-06-06 13:51 ` Arnaldo Carvalho de Melo
2024-06-07 6:10 ` Namhyung Kim
2024-06-06 13:47 ` Arnaldo Carvalho de Melo
2024-05-28 20:00 ` Linus Torvalds [this message]
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='CAHk-=wg3TciVzg7To1KVueCmwJoDEZZSurGPb+a7Dn7Dij=4YQ@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=asmadeus@codewreck.org \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.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 \
/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).