Skip to content

Commit f67d395

Browse files
Taeungacmel
authored andcommitted
perf annotate TUI: Fix column header when toggling period/percent
We have the 't' hotkey to toggle showing either the total period or the percentage of samples for a given line, but we forgot to toggle as well the column header, always showing "Percent", even when showing the period, fix it. Signed-off-by: Taeung Song <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] [ Extracted from a larger patch, s/Event count/Period/g ] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent bc1e5d6 commit f67d395

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/ui/browsers/annotate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static void annotate_browser__write(struct ui_browser *browser, void *entry, int
166166
if (!show_title)
167167
ui_browser__write_nstring(browser, " ", pcnt_width);
168168
else
169-
ui_browser__printf(browser, "%*s", 7, "Percent");
169+
ui_browser__printf(browser, "%*s", 7, annotate_browser__opts.show_total_period ? "Period" : "Percent");
170170
}
171171
if (ab->have_cycles) {
172172
if (dl->ipc)

0 commit comments

Comments
 (0)