diff options
author | Namhyung Kim <namhyung@kernel.org> | 2024-06-07 13:29:17 -0700 |
---|---|---|
committer | Namhyung Kim <namhyung@kernel.org> | 2024-06-15 21:04:04 -0700 |
commit | 411ee13598ef322c1a7f4a4022a84d995873f235 (patch) | |
tree | c6396fe88e9e6036cd00760dc406429b2572ab80 /tools/perf/builtin-report.c | |
parent | 8f6071a3dce40e6991877873699b84c4fb570ab3 (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/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 69618fb0110b..9718770facb5 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -810,8 +810,8 @@ static int stats_print(struct report *rep) { struct perf_session *session = rep->session; - perf_session__fprintf_nr_events(session, stdout, rep->skip_empty); - evlist__fprintf_nr_events(session->evlist, stdout, rep->skip_empty); + perf_session__fprintf_nr_events(session, stdout); + evlist__fprintf_nr_events(session->evlist, stdout); return 0; } @@ -1089,10 +1089,8 @@ static int __cmd_report(struct report *rep) perf_session__fprintf_dsos(session, stdout); if (dump_trace) { - perf_session__fprintf_nr_events(session, stdout, - rep->skip_empty); - evlist__fprintf_nr_events(session->evlist, stdout, - rep->skip_empty); + perf_session__fprintf_nr_events(session, stdout); + evlist__fprintf_nr_events(session->evlist, stdout); return 0; } } @@ -1562,6 +1560,8 @@ int cmd_report(int argc, const char **argv) data.path = input_name; data.force = symbol_conf.force; + symbol_conf.skip_empty = report.skip_empty; + repeat: session = perf_session__new(&data, &report.tool); if (IS_ERR(session)) { |