diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-31 15:08:39 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-31 15:08:39 -0500 |
commit | 229ade9ba36341f7369ecb4f134bcec9133520bf (patch) | |
tree | 34a691fe2862d5686c48a684c2ab0c42eb8991e4 /tools/perf/util | |
parent | 8c3e10eb1968877d6a1957b7e790c6ce01bd56fc (diff) |
perf tools: Don't fallback to setup_pager unconditionally
Because in tools like 'top' we don't want the pager.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/cache.h | 7 | ||||
-rw-r--r-- | tools/perf/util/ui/setup.c | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h index a7729797fd96..fc5e5a09d5b9 100644 --- a/tools/perf/util/cache.h +++ b/tools/perf/util/cache.h | |||
@@ -34,13 +34,14 @@ extern int pager_use_color; | |||
34 | extern int use_browser; | 34 | extern int use_browser; |
35 | 35 | ||
36 | #ifdef NO_NEWT_SUPPORT | 36 | #ifdef NO_NEWT_SUPPORT |
37 | static inline void setup_browser(void) | 37 | static inline void setup_browser(bool fallback_to_pager) |
38 | { | 38 | { |
39 | setup_pager(); | 39 | if (fallback_to_pager) |
40 | setup_pager(); | ||
40 | } | 41 | } |
41 | static inline void exit_browser(bool wait_for_ok __used) {} | 42 | static inline void exit_browser(bool wait_for_ok __used) {} |
42 | #else | 43 | #else |
43 | void setup_browser(void); | 44 | void setup_browser(bool fallback_to_pager); |
44 | void exit_browser(bool wait_for_ok); | 45 | void exit_browser(bool wait_for_ok); |
45 | #endif | 46 | #endif |
46 | 47 | ||
diff --git a/tools/perf/util/ui/setup.c b/tools/perf/util/ui/setup.c index 662085032eb7..fbf1a145492f 100644 --- a/tools/perf/util/ui/setup.c +++ b/tools/perf/util/ui/setup.c | |||
@@ -14,11 +14,12 @@ static void newt_suspend(void *d __used) | |||
14 | newtResume(); | 14 | newtResume(); |
15 | } | 15 | } |
16 | 16 | ||
17 | void setup_browser(void) | 17 | void setup_browser(bool fallback_to_pager) |
18 | { | 18 | { |
19 | if (!isatty(1) || !use_browser || dump_trace) { | 19 | if (!isatty(1) || !use_browser || dump_trace) { |
20 | use_browser = 0; | 20 | use_browser = 0; |
21 | setup_pager(); | 21 | if (fallback_to_pager) |
22 | setup_pager(); | ||
22 | return; | 23 | return; |
23 | } | 24 | } |
24 | 25 | ||