perf ui helpline: Provide a printf variant
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: 9484b86e9cad903d3295d75c03961c3bdd1444a8 Gitweb: http://git.kernel.org/tip/9484b86e9cad903d3295d75c03961c3bdd1444a8 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Fri, 25 Nov 2016 15:48:25 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Fri, 25 Nov 2016 15:49:16 -0300
perf ui helpline: Provide a printf variant
To print some values, like in the annotation code with invalid jump offsets.
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]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/ui/helpline.c | 10 ++++++++++ tools/perf/ui/helpline.h | 1 + 2 files changed, 11 insertions(+)
tools/perf/ui/helpline.c +10 -0
@@ -72,3 +72,13 @@ int ui_helpline__vshow(const char *fmt, va_list ap) {return helpline_fns->show (fmt, ap); } + +void ui_helpline__printf (const char *fmt, ...) +{ +va_list ap; + +ui_helpline__pop (); +va_start (ap, fmt); +ui_helpline__vpush (fmt, ap); +va_end (ap); +}
tools/perf/ui/helpline.h +1 -0
@@ -21,6 +21,7 @@ void ui_helpline__push(const char *msg);void ui_helpline__vpush (const char *fmt,va_list ap);void ui_helpline__fpush (const char *fmt, ...);void ui_helpline__puts (const char *msg); +void ui_helpline__printf (const char *fmt, ...);int ui_helpline__vshow (const char *fmt,va_list ap);extern char ui_helpline__current[512 ];