Skip to contentSkip to conversation

perf tools: Fix TUI helpline output

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Jan 24, 2013 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  044c4f8fbab513af399ff8ce7a2af2d303d85849
Gitweb:     http://git.kernel.org/tip/044c4f8fbab513af399ff8ce7a2af2d303d85849
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Thu, 29 Nov 2012 16:51:01 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Sun, 9 Dec 2012 08:46:07 -0300

perf tools: Fix TUI helpline output

In commit e2f4351 "perf ui/helpline: Introduce ui_helpline__vshow()" the test for the browser used made ui_helpline__vshow() to be called only for the GTK browser.

The TUI one then was not used and vfprintf(stderr, ...) was used instead, making the TUI scroll the screen instead of just printing on the last line.

Fix it by doing the proper check, that is to call ui_helpline__vshow to be called for both the TUI and GTK browsers.

Cc David Ahern <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
---
 tools/perf/util/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/debug.c +1 -1
index 391c9a9..399e74c 100644
@@ -23,7 +23,7 @@ int eprintf(int level, const char *fmt, ...)
 
 	if (verbose >= level) {
 		va_start(args, fmt);
-		if (use_browser > 1)
+		if (use_browser >= 1)
 			ui_helpline__vshow(fmt, args);
 		else
 			ret = vfprintf(stderr, fmt, args);