From: tip-bot for Namhyung Kim <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
eranian@google.com, hpa@zytor.com, mingo@kernel.org,
a.p.zijlstra@chello.nl, namhyung.kim@lge.com,
namhyung@kernel.org, jolsa@redhat.com, dsahern@gmail.com,
tglx@linutronix.de
Subject: [tip:perf/core] perf top: Handle 'z' key for toggle zeroing samples in TUI
Date: Thu, 14 Aug 2014 01:49:41 -0700 [thread overview]
Message-ID: <tip-42337a222c93cd22864f20ef9b157765ab1086a0@git.kernel.org> (raw)
In-Reply-To: <1407831366-28892-2-git-send-email-namhyung@kernel.org>
Commit-ID: 42337a222c93cd22864f20ef9b157765ab1086a0
Gitweb: http://git.kernel.org/tip/42337a222c93cd22864f20ef9b157765ab1086a0
Author: Namhyung Kim <namhyung@kernel.org>
AuthorDate: Tue, 12 Aug 2014 17:16:06 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 13 Aug 2014 17:29:37 -0300
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>
---
tools/perf/ui/browsers/hists.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 1818d12..4892480 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -10,6 +10,7 @@
#include "../../util/pstack.h"
#include "../../util/sort.h"
#include "../../util/util.h"
+#include "../../util/top.h"
#include "../../arch/common.h"
#include "../browser.h"
@@ -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"
"t Zoom into current Thread\n"
"V Verbose (DSO names in callchains, etc)\n"
+ "z Toggle zeroing of samples\n"
"/ Filter symbol by name";
if (browser == NULL)
@@ -1632,6 +1634,13 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events,
case 'F':
symbol_conf.filter_relative ^= 1;
continue;
+ case 'z':
+ if (!is_report_browser(hbt)) {
+ struct perf_top *top = hbt->arg;
+
+ top->zero = !top->zero;
+ }
+ continue;
case K_F1:
case 'h':
case '?':
next prev parent reply other threads:[~2014-08-14 8:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 8:16 [RFC/PATCH 1/2] perf top: Fix -z option behavior Namhyung Kim
2014-08-12 8:16 ` [PATCH 2/2] perf top: Handle 'z' key for toggle zeroing samples in TUI Namhyung Kim
2014-08-12 23:07 ` Stephane Eranian
2014-08-13 20:37 ` Arnaldo Carvalho de Melo
2014-08-13 20:47 ` Stephane Eranian
2014-08-19 6:09 ` Namhyung Kim
2014-08-14 8:49 ` tip-bot for Namhyung Kim [this message]
2014-08-12 19:01 ` [RFC/PATCH 1/2] perf top: Fix -z option behavior David Ahern
2014-08-13 4:52 ` Namhyung Kim
2014-08-13 5:47 ` David Ahern
2014-08-13 20:20 ` Arnaldo Carvalho de Melo
2014-08-12 23:05 ` Stephane Eranian
2014-08-13 20:27 ` Arnaldo Carvalho de Melo
2014-08-19 6:07 ` Namhyung Kim
2014-08-14 8:49 ` [tip:perf/core] " tip-bot for Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-42337a222c93cd22864f20ef9b157765ab1086a0@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox