summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorAaron Tomlin <atomlin@atomlin.com>2026-07-18 21:38:00 -0400
committerNamhyung Kim <namhyung@kernel.org>2026-07-19 21:49:30 -0700
commit64724095a33fbee805657415a4eb374bef5161c9 (patch)
tree05a2409f3f0f2b88731bbd5ef94d90e1dfe54484 /tools/perf/scripts/python/export-to-postgresql.py
parente01c7bd5b1eece254bcbf282db066b12c4815d21 (diff)
perf stat: Add --hide-zero-events option to suppress zero-count events
When monitoring a large number of events (e.g., with wildcards such as --event 'syscalls:sys_enter_*'), many matched events will return a count of zero. This clutters the output, making it difficult to spot the active events. Add a new option --hide-zero-events to suppress printing events that have a count of zero. To prevent formatting and diagnostic issues, the zero-skipping logic implements the following rules: 1. In metric-only mode (i.e., --metric-only), columns must remain aligned in the output grid. We evaluate config->metric_only first to avoid skipping zero-valued columns, preventing values from shifting left and aligning under incorrect headers 2. For explicitly requested events, we ensure they are not silently hidden if they are unsupported. We only hide a zero-count event if counter->supported is true, ensuring that unsupported explicit events still report "<not supported>" Signed-off-by: Aaron Tomlin <atomlin@atomlin.com> Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions