diff options
| author | Namhyung Kim <[email protected]> | 2017-03-07 15:08:33 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2017-03-07 15:48:46 +0000 |
| commit | 1936feae54a6724a27a6ca1b948fd0e80371f7b0 (patch) | |
| tree | 27dcaea54db5ce2f2e67130f4f3b76f02da1b5bf /tools/perf/builtin-annotate.c | |
| parent | perf c2c: Clarify help message of --stats option (diff) | |
| download | kernel-1936feae54a6724a27a6ca1b948fd0e80371f7b0.tar.gz kernel-1936feae54a6724a27a6ca1b948fd0e80371f7b0.zip | |
perf c2c: Fix display bug when using pipe
Currently 'perf c2c report' determines display mode using the --stdio
option, but it could be a problem if stdout is not a tty since
setup_browser falls back to stdio in this case.
But perf c2c didn't know this and tried to use TUI browser anyway. It
should check "use_browser" variable instead.
For example, the following command showed nothing and broke terminal
setting. Now it's fixed..
$ perf c2c report | head
=================================================
Trace Event Information
=================================================
Total records : 136
Locked Load/Store Operations : 6
Load Operations : 62
Loads - uncacheable : 0
Loads - IO : 1
Loads - Miss : 7
Loads - no mapping : 2
Committer notes:
When trying it without a proper perf.data file it results in a stuck
terminal, just as Namhyung reported above:
[acme@jouet ~]$ perf c2c report | head
WARNING: no sample cpu value[acme@jouet ~]$
One has to kill it from some other xterm. Confirm that this patch fixes
it:
After:
$ perf c2c report | head
WARNING: no sample cpu value=================================================
Trace Event Information
=================================================
Total records : 14
Locked Load/Store Operations : 0
Load Operations : 0
Loads - uncacheable : 0
Loads - IO : 0
Loads - Miss : 0
Loads - no mapping : 0
$
Signed-off-by: Namhyung Kim <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
0 files changed, 0 insertions, 0 deletions
