summaryrefslogtreecommitdiff
path: root/tools/perf/ui/stdio
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2024-06-07 13:29:17 -0700
committerNamhyung Kim <namhyung@kernel.org>2024-06-15 21:04:04 -0700
commit411ee13598ef322c1a7f4a4022a84d995873f235 (patch)
treec6396fe88e9e6036cd00760dc406429b2572ab80 /tools/perf/ui/stdio
parent8f6071a3dce40e6991877873699b84c4fb570ab3 (diff)
perf hist: Add symbol_conf.skip_empty
Add the skip_empty flag to symbol_conf and set the value from the report command to preserve the existing behavior. This makes the code simpler and will be needed other code which is hard to add a new argument. Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20240607202918.2357459-4-namhyung@kernel.org
Diffstat (limited to 'tools/perf/ui/stdio')
-rw-r--r--tools/perf/ui/stdio/hist.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c
index b849caace398..9372e8904d22 100644
--- a/tools/perf/ui/stdio/hist.c
+++ b/tools/perf/ui/stdio/hist.c
@@ -897,8 +897,7 @@ out:
return ret;
}
-size_t events_stats__fprintf(struct events_stats *stats, FILE *fp,
- bool skip_empty)
+size_t events_stats__fprintf(struct events_stats *stats, FILE *fp)
{
int i;
size_t ret = 0;
@@ -910,7 +909,7 @@ size_t events_stats__fprintf(struct events_stats *stats, FILE *fp,
name = perf_event__name(i);
if (!strcmp(name, "UNKNOWN"))
continue;
- if (skip_empty && !stats->nr_events[i])
+ if (symbol_conf.skip_empty && !stats->nr_events[i])
continue;
if (i && total) {