aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-08-12 04:16:06 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-08-13 16:29:37 -0400
commit42337a222c93cd22864f20ef9b157765ab1086a0 (patch)
treefd2f4c9e095a914f789df2882e98c48148c3a409 /tools
parent701937bd59cc94b6913086feb62f05ae565ff2de (diff)
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: Stephane Eranian <eranian@google.com> Tested-by: Stephane Eranian <eranian@google.com> Signed-off-by: Namhyung 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.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/ui/browsers/hists.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 1818d1275d02..4892480e8298 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -10,6 +10,7 @@
10#include "../../util/pstack.h" 10#include "../../util/pstack.h"
11#include "../../util/sort.h" 11#include "../../util/sort.h"
12#include "../../util/util.h" 12#include "../../util/util.h"
13#include "../../util/top.h"
13#include "../../arch/common.h" 14#include "../../arch/common.h"
14 15
15#include "../browser.h" 16#include "../browser.h"
@@ -1532,6 +1533,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
1532 "P Print histograms to perf.hist.N\n" 1533 "P Print histograms to perf.hist.N\n"
1533 "t Zoom into current Thread\n" 1534 "t Zoom into current Thread\n"
1534 "V Verbose (DSO names in callchains, etc)\n" 1535 "V Verbose (DSO names in callchains, etc)\n"
1536 "z Toggle zeroing of samples\n"
1535 "/ Filter symbol by name"; 1537 "/ Filter symbol by name";
1536 1538
1537 if (browser == NULL) 1539 if (browser == NULL)
@@ -1632,6 +1634,13 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
1632 case 'F': 1634 case 'F':
1633 symbol_conf.filter_relative ^= 1; 1635 symbol_conf.filter_relative ^= 1;
1634 continue; 1636 continue;
1637 case 'z':
1638 if (!is_report_browser(hbt)) {
1639 struct perf_top *top = hbt->arg;
1640
1641 top->zero = !top->zero;
1642 }
1643 continue;
1635 case K_F1: 1644 case K_F1:
1636 case 'h': 1645 case 'h':
1637 case '?': 1646 case '?':