From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Stephane Eranian <eranian@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
Andi Kleen <ak@linux.intel.com>, Ian Rogers <irogers@google.com>
Subject: Re: [PATCH v3] perf evsel: Fix missing exclude_{host,guest} setting
Date: Wed, 3 Nov 2021 18:03:17 -0300 [thread overview]
Message-ID: <YYL5FaKQ1ZvGwd08@kernel.org> (raw)
In-Reply-To: <CABPqkBQkqehAvpfJk77WZpXezrVO6cAj=9ktKFgL=C_m84_Dgg@mail.gmail.com>
Em Wed, Nov 03, 2021 at 10:35:04AM -0700, Stephane Eranian escreveu:
> On Wed, Nov 3, 2021 at 4:32 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> > Em Wed, Nov 03, 2021 at 12:44:12AM -0700, Stephane Eranian escreveu:
> > > On Wed, Nov 3, 2021 at 12:24 AM Jiri Olsa <jolsa@redhat.com> wrote:
> > > > > If the pmu doesn't support host/guest filtering, pmu/bla1/G
> > > > > may count something. Not sure if it's better to error out.
> > > > > But the cycles:G and instructions:G should result in 0
> > > > > in case there's no VM running.
> > > > hm, I think if pmu doesn't support host/guest filtering then
> > > > I think 'pmu/bla1/G' should error, no? better no number than
> > > > bad number
> > > Yes, it should in my opinion.
> > Yeah, I thought about this yesterday (holiday here).
> Otherwise you create the illusion that you are monitoring in guest
> mode when you are not.
> The question is: how can the tool know which modifiers are supported
> per pmu model?
As things stand kernel-wise, we should just do capability querying, i.e.
if the user asks for a feature not available for a specific PMU, we
should refuse and provide a helpful error message to the user.
If the PMUs in the kernel had some kind of mask that stated what of the
'struct perf_event_attr' selectable features are supported, then we
would just be able to avoid bothering the kernel asking for unsupported
stuff.
Just for exclude_guest we don't even need to have
evsel->pmu->missing_features.exclude_guest, as this is a hard error, no
point in caching previous capability queries.
- Arnaldo
next prev parent reply other threads:[~2021-11-03 21:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-29 22:49 [PATCH v3] perf evsel: Fix missing exclude_{host,guest} setting Namhyung Kim
2021-10-31 11:13 ` Jiri Olsa
2021-11-01 21:09 ` Arnaldo Carvalho de Melo
2021-11-02 23:08 ` Namhyung Kim
2021-11-02 14:10 ` Jiri Olsa
2021-11-02 23:21 ` Namhyung Kim
2021-11-03 7:24 ` Jiri Olsa
2021-11-03 7:44 ` Stephane Eranian
2021-11-03 11:32 ` Arnaldo Carvalho de Melo
2021-11-03 17:35 ` Stephane Eranian
2021-11-03 21:03 ` Arnaldo Carvalho de Melo [this message]
2021-11-03 22:29 ` Stephane Eranian
2021-11-04 17:40 ` Arnaldo Carvalho de Melo
2021-11-04 21:38 ` Namhyung Kim
2021-11-03 7:21 ` Ravi Bangoria
2021-11-05 18:00 ` Namhyung Kim
2021-11-06 19:24 ` Arnaldo Carvalho de Melo
2021-11-07 10:25 ` Ravi Bangoria
2021-11-07 10:57 ` Arnaldo Carvalho de Melo
2021-11-08 18:50 ` 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=YYL5FaKQ1ZvGwd08@kernel.org \
--to=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.