summaryrefslogtreecommitdiff
path: root/tools/perf/ui/gtk/annotate.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2022-11-14 15:02:24 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-11-16 09:51:23 -0300
commit2cf38236d94605586da0ed0f9ec432bf0eb415c3 (patch)
treef97ed18f4abd5dd1c82f64eb660d113a3f50d23a /tools/perf/ui/gtk/annotate.c
parent453279d5739f12cf27b604c84c061a8a7a3937da (diff)
perf stat: Factor out prefix display
The prefix is needed for interval mode to print timestamp at the beginning of each line. But the it's tricky for the metric only mode since it doesn't print every evsel and combines the metrics into a single line. So it needed to pass 'first' argument to print_counter_aggrdata() to determine if the current event is being printed at first. This makes the code hard to read. Let's move the logic out of the function and do it in the outer print loop. This would enable further cleanups later. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com> Link: https://lore.kernel.org/r/20221114230227.1255976-17-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/gtk/annotate.c')
0 files changed, 0 insertions, 0 deletions