From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Namhyung Kim <namhyung@kernel.org>,
David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@redhat.com>,
Namhyung Kim <namhyung.kim@lge.com>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Stephane Eranian <eranian@google.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 30/41] perf top: Handle 'z' key for toggle zeroing samples in TUI
Date: Wed, 13 Aug 2014 19:48:16 -0300 [thread overview]
Message-ID: <1407970107-24540-31-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1407970107-24540-1-git-send-email-acme@kernel.org>
From: Namhyung Kim <namhyung@kernel.org>
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 1818d1275d02..4892480e8298 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 '?':
--
1.9.3
next prev parent reply other threads:[~2014-08-13 22:53 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-13 22:47 [GIT PULL 00/41] perf/core improvements and fixes Arnaldo Carvalho de Melo
2014-08-13 22:47 ` [PATCH 01/41] perf top: Don't look for kernel idle symbols in all DSOs Arnaldo Carvalho de Melo
2014-08-13 22:47 ` [PATCH 02/41] perf tools: Add cpu_startup_entry to the list of kernel idle symbols Arnaldo Carvalho de Melo
2014-08-13 22:47 ` [PATCH 03/41] perf top: Join the display thread on exit Arnaldo Carvalho de Melo
2014-08-13 22:47 ` [PATCH 04/41] perf tools: Introduce set_term_quiet_input helper function Arnaldo Carvalho de Melo
2014-08-13 22:47 ` [PATCH 05/41] perf top: Setup signals for terminal output Arnaldo Carvalho de Melo
2014-08-13 22:47 ` [PATCH 06/41] perf kvm: Fix stdin handling for 'kvm stat live' command Arnaldo Carvalho de Melo
2014-08-13 22:47 ` [PATCH 07/41] perf probe: Fix --list option to show events only with uprobe events Arnaldo Carvalho de Melo
2014-08-13 22:47 ` [PATCH 08/41] perf probe: Fix --del option to delete " Arnaldo Carvalho de Melo
2014-08-13 22:47 ` [PATCH 09/41] perf trace: Add beautifier for mremap flags param Arnaldo Carvalho de Melo
2014-08-13 22:47 ` [PATCH 10/41] perf tools: Fix CLOEXEC probe for perf_event_paranoid == 2 Arnaldo Carvalho de Melo
2014-08-13 22:47 ` [PATCH 11/41] perf tools: Fix one of the probe events to exclude kernel Arnaldo Carvalho de Melo
2014-08-13 22:47 ` [PATCH 12/41] perf tools: Fix probing the kernel API with cpu-wide events Arnaldo Carvalho de Melo
2014-08-13 22:47 ` [PATCH 13/41] perf tools: Prefer to use a cpu-wide event for probing CLOEXEC Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 14/41] perf script: Fix possible memory leaks Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 15/41] perf symbols: Fix a memory leak in vmlinux_path__init() Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 16/41] perf annotate: Move session handling out of __cmd_annotate() Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 17/41] perf buildid-cache: Move session handling into cmd_buildid_cache() Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 18/41] perf inject: Move session handling out of __cmd_inject() Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 19/41] perf kmem: Move session handling out of __cmd_kmem() Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 20/41] perf kvm: Move call to symbol__init() after creating session Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 21/41] perf lock: " Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 22/41] perf sched: " Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 23/41] perf script: " Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 24/41] perf timechart: " Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 25/41] perf trace: " Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 26/41] perf tools: Check recorded kernel version when finding vmlinux Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 27/41] perf hists browser: Fix a small callchain display bug Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 28/41] perf report: Set proper sort__mode for the branch option Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 29/41] perf top: Fix -z option behavior Arnaldo Carvalho de Melo
2014-08-13 22:48 ` Arnaldo Carvalho de Melo [this message]
2014-08-13 22:48 ` [PATCH 31/41] perf symbols: Don't demangle parameters and such by default Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 32/41] perf symbols: Fix missing label symbols Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 33/41] perf evlist: Add 'system_wide' option Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 34/41] perf evlist: Add perf_evlist__set_tracking_event() Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 35/41] perf session: Add perf_session__peek_event() Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 36/41] perf script: Allow callchains if any event samples them Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 37/41] perf script python: Add helpers for calling Python objects Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 38/41] perf tools: Identify which comms are from exec Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 39/41] perf machine: Add machine__thread_exec_comm() Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 40/41] perf tools: Add flags and insn_len to struct sample Arnaldo Carvalho de Melo
2014-08-13 22:48 ` [PATCH 41/41] perf evlist: Add perf_evlist__enable_event_idx() Arnaldo Carvalho de Melo
2014-08-14 8:40 ` [GIT PULL 00/41] perf/core improvements and fixes Ingo Molnar
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=1407970107-24540-31-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
/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