perf report: Enable data-type profiling with -F option too

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>
This commit is contained in:
Namhyung Kim 2025-12-09 18:33:25 -08:00 committed by Arnaldo Carvalho de Melo
parent bdd051e249
commit 9cdc9738d1

View File

@ -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;