提交 42337a22 编写于 作者: N Namhyung Kim 提交者: Arnaldo Carvalho de Melo

perf top: Handle 'z' key for toggle zeroing samples in TUI

The perf top TUI lacks 'z' key support to toggle sample zeroing.
Add it.
Reported-by: NStephane Eranian <eranian@google.com>
Tested-by: NStephane Eranian <eranian@google.com>
Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1407831366-28892-2-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 701937bd
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "../../util/pstack.h" #include "../../util/pstack.h"
#include "../../util/sort.h" #include "../../util/sort.h"
#include "../../util/util.h" #include "../../util/util.h"
#include "../../util/top.h"
#include "../../arch/common.h" #include "../../arch/common.h"
#include "../browser.h" #include "../browser.h"
...@@ -1532,6 +1533,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, ...@@ -1532,6 +1533,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
"P Print histograms to perf.hist.N\n" "P Print histograms to perf.hist.N\n"
"t Zoom into current Thread\n" "t Zoom into current Thread\n"
"V Verbose (DSO names in callchains, etc)\n" "V Verbose (DSO names in callchains, etc)\n"
"z Toggle zeroing of samples\n"
"/ Filter symbol by name"; "/ Filter symbol by name";
if (browser == NULL) if (browser == NULL)
...@@ -1632,6 +1634,13 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, ...@@ -1632,6 +1634,13 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
case 'F': case 'F':
symbol_conf.filter_relative ^= 1; symbol_conf.filter_relative ^= 1;
continue; continue;
case 'z':
if (!is_report_browser(hbt)) {
struct perf_top *top = hbt->arg;
top->zero = !top->zero;
}
continue;
case K_F1: case K_F1:
case 'h': case 'h':
case '?': case '?':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册