]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf report: Enable data-type profiling with -F option too
authorNamhyung Kim <namhyung@kernel.org>
Wed, 10 Dec 2025 02:33:25 +0000 (18:33 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 17 Dec 2025 12:30:37 +0000 (09:30 -0300)
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.

Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-report.c

index add6b1c2aaf04270fc87825a759142d90ef61356..6c2b4f93ec78e5793161c04026296f449aa941ae 100644 (file)
@@ -1727,7 +1727,8 @@ repeat:
                        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;