Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1307692
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 10/11] perf ui/tui: Print helpline message as is |
| Date | 2016-01-12 19:00 +0100 |
| Message-ID | <qQboC-4jE-5@gated-at.bofh.it> (permalink) |
| References | <qQboC-4jE-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Namhyung Kim <namhyung@kernel.org>
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 <namhyung@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1452509594-13616-1-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/ui/browsers/hists.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 901d481e6cea..08c09ad755d2 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -480,7 +480,7 @@ static int hist_browser__run(struct hist_browser *browser, const char *help)
hists__browser_title(browser->hists, hbt, title, sizeof(title));
- if (ui_browser__show(&browser->b, title, help) < 0)
+ if (ui_browser__show(&browser->b, title, "%s", help) < 0)
return -1;
while (1) {
--
2.1.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 10/11] perf ui/tui: Print helpline message as is Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-01-12 19:00 +0100
csiph-web