Skip to content

Commit 090cff3

Browse files
namhyungacmel
authored andcommitted
perf ui/tui: Print helpline message as is
When a tip message contains a percent sign, it was treated printf format specifier so broken string was printed like below. Tip: Limit to show entries above 577nly: perf report --percent-limit 5 ^^^ As ui_browser__show receives format string, pass additional "%s" so that the help (tip) message can be printed as is. Tip: Limit to show entries above 5% only: perf report --percent-limit 5 Signed-off-by: Namhyung Kim <[email protected]> Cc: Andi Kleen <[email protected]> Cc: David Ahern <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Wang Nan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 84cfac7 commit 090cff3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/ui/browsers/hists.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ static int hist_browser__run(struct hist_browser *browser, const char *help)
480480

481481
hists__browser_title(browser->hists, hbt, title, sizeof(title));
482482

483-
if (ui_browser__show(&browser->b, title, help) < 0)
483+
if (ui_browser__show(&browser->b, title, "%s", help) < 0)
484484
return -1;
485485

486486
while (1) {

0 commit comments

Comments
 (0)