Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234380
b: refs/heads/master
c: 229ade9
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Jan 31, 2011
1 parent 9150b48 commit 6c4abf2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c3e10eb1968877d6a1957b7e790c6ce01bd56fc
refs/heads/master: 229ade9ba36341f7369ecb4f134bcec9133520bf
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __used)
else if (use_tui)
use_browser = 1;

setup_browser();
setup_browser(true);

symbol_conf.priv_size = sizeof(struct sym_priv);
symbol_conf.try_vmlinux_path = true;
Expand Down
2 changes: 1 addition & 1 deletion trunk/tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __used)
use_browser = 1;

if (strcmp(input_name, "-") != 0)
setup_browser();
setup_browser(true);
else
use_browser = 0;
/*
Expand Down
7 changes: 4 additions & 3 deletions trunk/tools/perf/util/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ extern int pager_use_color;
extern int use_browser;

#ifdef NO_NEWT_SUPPORT
static inline void setup_browser(void)
static inline void setup_browser(bool fallback_to_pager)
{
setup_pager();
if (fallback_to_pager)
setup_pager();
}
static inline void exit_browser(bool wait_for_ok __used) {}
#else
void setup_browser(void);
void setup_browser(bool fallback_to_pager);
void exit_browser(bool wait_for_ok);
#endif

Expand Down
5 changes: 3 additions & 2 deletions trunk/tools/perf/util/ui/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ static void newt_suspend(void *d __used)
newtResume();
}

void setup_browser(void)
void setup_browser(bool fallback_to_pager)
{
if (!isatty(1) || !use_browser || dump_trace) {
use_browser = 0;
setup_pager();
if (fallback_to_pager)
setup_pager();
return;
}

Expand Down

0 comments on commit 6c4abf2

Please sign in to comment.