diff options
| author | Namhyung Kim <namhyung@kernel.org> | 2025-02-10 22:07:45 -0800 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2025-02-19 13:23:58 -0800 |
| commit | acda4c200185f55f10023bd9fcbf97915cc0fa0a (patch) | |
| tree | b02b5d1b81a9a74c0dbb4501d7c76ca3bbb27ff7 /tools/perf/builtin-report.c | |
| parent | 43c2b6139b188d8a756130147f7efd5ddf99f88d (diff) | |
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.
Link: https://lore.kernel.org/r/20250211060745.294289-2-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/builtin-report.c')
| -rw-r--r-- | tools/perf/builtin-report.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index a8845e648669..d32b4e2805ad 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -1865,6 +1865,11 @@ repeat: 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; |
