From: Will Deacon <will.deacon@arm.com>
To: Kim Phillips <kim.phillips@arm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
linux-arm-kernel@lists.infradead.org, marc.zyngier@arm.com,
mark.rutland@arm.com, tglx@linutronix.de, peterz@infradead.org,
alexander.shishkin@linux.intel.com, robh@kernel.org,
suzuki.poulose@arm.com, pawel.moll@arm.com,
mathieu.poirier@linaro.org, mingo@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [RFC 2/3] perf tool: stat: say more about why event is not supported by the kernel
Date: Tue, 24 Oct 2017 14:35:30 +0100 [thread overview]
Message-ID: <20171024133530.GB13445@arm.com> (raw)
In-Reply-To: <20171024030408.d29c81d6134bf63df18ae618@arm.com>
On Tue, Oct 24, 2017 at 03:04:08AM -0500, Kim Phillips wrote:
> Call perf_evsel__open_strerror() to potentially expand upon why the
> event was "not supported by the kernel." See the enhanced '-v' example
> output messages in the next patch.
Nit: it would be better if the commit message was self-contained. It might
also be worth moving some of the commit meesage for the final patch out into
a cover letter, since there's an awful lot in there.
> Signed-off-by: Kim Phillips <kim.phillips@arm.com>
> ---
> tools/perf/builtin-stat.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index 69523ed55894..8f0323db3c00 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -625,9 +625,13 @@ static int __run_perf_stat(int argc, const char **argv)
> if (errno == EINVAL || errno == ENOSYS ||
> errno == ENOENT || errno == EOPNOTSUPP ||
> errno == ENXIO) {
> - if (verbose > 0)
> + if (verbose > 0) {
> ui__warning("%s event is not supported by the kernel.\n",
> perf_evsel__name(counter));
> + perf_evsel__open_strerror(counter, &target,
> + errno, msg, sizeof(msg));
> + ui__error("%s\n", msg);
> + }
Hmm, perf_evsel__open_strerror can already get called a few lines later, so
I don't think this change is right. It looks like the intention here is that
we can push ahead skipping unsupported events unless they are the leader of
a populated group. If this isn't working as intended, then it looks like we
need a helper to identify unsupported events instead.
Will
next parent reply other threads:[~2017-10-24 13:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20171024030408.d29c81d6134bf63df18ae618@arm.com>
2017-10-24 13:35 ` Will Deacon [this message]
2017-10-25 0:47 ` Kim Phillips
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=20171024133530.GB13445@arm.com \
--to=will.deacon@arm.com \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=kim.phillips@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@redhat.com \
--cc=pawel.moll@arm.com \
--cc=peterz@infradead.org \
--cc=robh@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=tglx@linutronix.de \
/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
Powered by JetHome