perf report: Disable children column for data type profiling
authorNamhyung Kim <namhyung@kernel.org>
Fri, 7 Mar 2025 08:08:29 +0000 (00:08 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 20 Mar 2025 16:17:56 +0000 (09:17 -0700)
I've realized that it doesn't make sense to accumulate the samples to
parent in the callchain when data type profiling is enabled.  Because it
won't have the same data type access in the parent.  Otherwise it'd see
something like this:

  $ perf report -s type --stdio -g none
  # To display the perf.data header info, please use --header/--header-only options.
  #
  #
  # Total Lost Samples: 0
  #
  # Samples: 2K of event 'cycles:Pu'
  # Event count (approx.): 8266456478
  #
  # Children  Latency      Self   Latency  Data Type
  # ........  .......  ........  ........  .........
  #
     698.97%   697.72%    99.80%    99.61%  (unknown)
       0.09%    0.18%     0.09%     0.18%  Elf64_Rela
       0.05%    0.10%     0.05%     0.10%  unsigned char
       0.05%    0.10%     0.05%     0.10%  struct exit_function_list
       0.00%    0.01%     0.00%     0.01%  struct rtld_global

Link: https://lore.kernel.org/r/20250307080829.354947-3-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/builtin-report.c

index fc776e9d7fdfa273cfa6b7dd6d6eaca750750ed6..b030ce72e13ea8d1f93c5a2717bfafd18b55104d 100644 (file)
@@ -1719,6 +1719,9 @@ repeat:
                report.data_type = true;
                annotate_opts.annotate_src = false;
 
+               /* disable incompatible options */
+               symbol_conf.cumulate_callchain = false;
+
 #ifndef HAVE_LIBDW_SUPPORT
                pr_err("Error: Data type profiling is disabled due to missing DWARF support\n");
                goto error;