[PATCH 2/4] perf report: Enable data-type profiling with -F option too

From: Namhyung Kim
Date: Tue Dec 09 2025 - 21:33:45 EST


It checked -s/--sort options only. As the sort keys can be setup using
the -F/--fields option as well, it should enable data-type profiling
with it too.

The following two commands should have the same output.

$ perf report -s type

$ perf report -F overhead,type

But there's another problem on this. I'll handle it in the next commit.

Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/builtin-report.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index add6b1c2aaf04270..6c2b4f93ec78e579 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -1727,7 +1727,8 @@ int cmd_report(int argc, const char **argv)
sort_order = NULL;
}

- if (sort_order && strstr(sort_order, "type")) {
+ if ((sort_order && strstr(sort_order, "type")) ||
+ (field_order && strstr(field_order, "type"))) {
report.data_type = true;
annotate_opts.annotate_src = false;

--
2.52.0.223.gf5cc29aaa4-goog