[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250211060745.294289-2-namhyung@kernel.org>
Date: Mon, 10 Feb 2025 22:07:45 -0800
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Kan Liang <kan.liang@...ux.intel.com>
Cc: Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-perf-users@...r.kernel.org,
Dmitry Vyukov <dvyukov@...gle.com>,
James Clark <james.clark@...aro.org>
Subject: [PATCH 2/2] perf report: Support switching data w/ and w/o callchains
The symbol_conf.use_callchain should be reset when switching to new data
file, otherwise report__setup_sample_type() will show an error message
that it enabled callchains but no callchain data. The function also
will turn on the callchains if the data has PERF_SAMPLE_CALLCHAIN so I
think it's ok to reset symbol_conf.use_callchain here.
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
---
tools/perf/builtin-report.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index c99b14a852dbdfbb..e7a7e9df1b42b3a7 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -1826,6 +1826,11 @@ int cmd_report(int argc, const char **argv)
if (ret == K_SWITCH_INPUT_DATA || ret == K_RELOAD) {
perf_session__delete(session);
last_key = K_SWITCH_INPUT_DATA;
+ /*
+ * To support switching between data with and without callchains.
+ * report__setup_sample_type() will update it properly.
+ */
+ symbol_conf.use_callchain = false;
goto repeat;
} else
ret = 0;
--
2.48.1.502.g6dc24dfdaf-goog
Powered by blists - more mailing lists