Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf report: Switch data file correctly in TUI

The 's' key is to switch to a new data file and load the data in the
same window. The switch_data_file() will show a popup menu to select
which data file user wants and update the 'input_name' global variable.

But in the cmd_report(), it didn't update the data.path using the new
'input_name' and keep usng the old file. This is fairly an old bug and
I assume people don't use this feature much. :)

Link: https://lore.kernel.org/r/20250211060745.294289-1-namhyung@kernel.org
Closes: https://lore.kernel.org/linux-perf-users/89e678bc-f0af-4929-a8a6-a2666f1294a4@linaro.org
Fixes: f5fc14124c5cefdd ("perf tools: Add data object to handle perf data file")
Reported-by: James Clark <james.clark@linaro.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

+1 -1
+1 -1
tools/perf/builtin-report.c
··· 1570 1570 input_name = "perf.data"; 1571 1571 } 1572 1572 1573 + repeat: 1573 1574 data.path = input_name; 1574 1575 data.force = symbol_conf.force; 1575 1576 1576 1577 symbol_conf.skip_empty = report.skip_empty; 1577 1578 1578 - repeat: 1579 1579 perf_tool__init(&report.tool, ordered_events); 1580 1580 report.tool.sample = process_sample_event; 1581 1581 report.tool.mmap = perf_event__process_mmap;