From: Aaron Tomlin <atomlin@atomlin.com>
To: Ian Rogers <irogers@google.com>
Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
namhyung@kernel.org, mark.rutland@arm.com,
alexander.shishkin@linux.intel.com, jolsa@kernel.org,
adrian.hunter@intel.com, james.clark@linaro.org,
howardchu95@gmail.com, neelx@suse.com, chjohnst@mail.com,
sean@ashe.io, linux-perf-users@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf stat: Add --hide-zero-events option to suppress zero-count events
Date: Fri, 17 Jul 2026 20:49:16 -0400 [thread overview]
Message-ID: <c6ohh5dtz7pziovntfu6d43zqfueflbnc63aidkhtsweqhlyly@gdb5kzo5qz6x> (raw)
In-Reply-To: <CAP-5=fVcpOPKoqRzYS0i0XzP8KwOhUFEwzuXtM3FbByBGTvO7Q@mail.gmail.com>
On Thu, Jul 16, 2026 at 10:22:01PM -0700, Ian Rogers wrote:
> I think this makes sense but perhaps the Python interface makes more
> sense for what you're doing. For example, the ilist app shows all
> events and metrics:
> https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/python/ilist.py?h=perf-tools-next
>
> Perhaps we could also add some tests for better coverage:
> https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/tests/shell/stat.sh?h=perf-tools-next
>
> Other than that:
> Reviewed-by: Ian Rogers <irogers@google.com>
>
> Thanks,
Hi Ian,
Thanks for the feedback and the "Reviewed-by:" tag!
Regarding the Python interface, it's definitely a powerful tool for custom
scripting and listing events. However, I prefer using 'perf stat' directly
on the command line for a few reasons:
1. Standard 'perf stat' works out-of-the-box on minimal production
systems where Python and the perf python bindings/dependencies
might not be installed or packaged
2. Having a simple command-line flag like '--hide-zero-events' makes
quick, interactive profiling directly on the CLI much more
convenient
I have updated the patch to incorporate your suggestion and added shell
test coverage for both '--hide-zero-events' and '--metric-only' in
tools/perf/tests/shell/stat.sh. I will submit v2 shortly.
Kind regards,
--
Aaron Tomlin
prev parent reply other threads:[~2026-07-18 0:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 2:31 Aaron Tomlin
2026-07-17 5:22 ` Ian Rogers
2026-07-18 0:49 ` Aaron Tomlin [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=c6ohh5dtz7pziovntfu6d43zqfueflbnc63aidkhtsweqhlyly@gdb5kzo5qz6x \
--to=atomlin@atomlin.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=chjohnst@mail.com \
--cc=howardchu95@gmail.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--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=neelx@suse.com \
--cc=peterz@infradead.org \
--cc=sean@ashe.io \
/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