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>,
Andi Kleen <andi@firstfloor.org>, David Ahern <dsahern@gmail.com>,
Jiri Olsa <jolsa@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Stephane Eranian <eranian@google.com>,
Wang Nan <wangnan0@huawei.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 16/26] perf hists browser: Offer 'Zoom into DSO'/'Map details' only when sort order has 'dso'
Date: Tue, 26 Jan 2016 16:19:05 -0300 [thread overview]
Message-ID: <1453835955-14224-17-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1453835955-14224-1-git-send-email-acme@kernel.org>
From: Namhyung Kim <namhyung@kernel.org>
We can't offer a zoom into DSO when a bucket (struct hist_entry) may
have samples for more than one DSO, i.e. when 'dso' is not part of
the sort order, ditto for 'Map details', fix it.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/1452960197-5323-9-git-send-email-namhyung@kernel.org
[ Carved out from a larger patch, moved check to add_{dso,map}_opt() ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/ui/browsers/hists.c | 4 ++--
tools/perf/util/sort.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index 2801d80c6903..e892106410a7 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -1825,7 +1825,7 @@ static int
add_dso_opt(struct hist_browser *browser, struct popup_action *act,
char **optstr, struct map *map)
{
- if (map == NULL)
+ if (!sort__has_dso || map == NULL)
return 0;
if (asprintf(optstr, "Zoom %s %s DSO",
@@ -1850,7 +1850,7 @@ static int
add_map_opt(struct hist_browser *browser __maybe_unused,
struct popup_action *act, char **optstr, struct map *map)
{
- if (map == NULL)
+ if (!sort__has_dso || map == NULL)
return 0;
if (asprintf(optstr, "Browse map details") < 0)
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h
index 09616f03d412..89a1273fd2da 100644
--- a/tools/perf/util/sort.h
+++ b/tools/perf/util/sort.h
@@ -32,6 +32,7 @@ extern const char default_sort_order[];
extern regex_t ignore_callees_regex;
extern int have_ignore_callees;
extern int sort__need_collapse;
+extern int sort__has_dso;
extern int sort__has_parent;
extern int sort__has_sym;
extern int sort__has_socket;
--
2.5.0
next prev parent reply other threads:[~2016-01-26 19:24 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 19:18 [PATCH 00/26] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-01-26 19:18 ` [PATCH 01/26] perf pmu: Fix misleadingly indented assignment (whitespace) Arnaldo Carvalho de Melo
2016-01-26 19:18 ` [PATCH 02/26] perf symbols: Do not read symbols/data from device files Arnaldo Carvalho de Melo
2016-01-26 19:18 ` [PATCH 03/26] perf stat: Making several helper functions static Arnaldo Carvalho de Melo
2016-01-26 19:18 ` [PATCH 04/26] perf hists: Remove parent filter check in DSO filter function Arnaldo Carvalho de Melo
2016-01-26 19:18 ` [PATCH 05/26] perf hists: Cleanup filtering functions Arnaldo Carvalho de Melo
2016-01-26 19:18 ` [PATCH 06/26] perf tools: Document the perf sysctls Arnaldo Carvalho de Melo
2016-01-26 19:18 ` [PATCH 07/26] perf annotate: Rename 'colors.code' to 'colors.jump_arrows' Arnaldo Carvalho de Melo
2016-01-26 19:18 ` [PATCH 08/26] perf config: Document variables for 'colors' section in man page Arnaldo Carvalho de Melo
2016-01-26 19:18 ` [PATCH 09/26] perf config: Document variables for 'tui' and 'gtk' sections " Arnaldo Carvalho de Melo
2016-01-26 19:18 ` [PATCH 10/26] perf config: Document 'buildid.dir' variable " Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 11/26] perf config: Document variables for 'annotate' section " Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 12/26] perf config: Document 'hist.percentage' variable " Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 13/26] perf sort: Provide a way to find out if per-thread bucketing is in place Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 14/26] perf hists browser: Only 'Zoom into thread' only when sort order has 'pid' Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 15/26] perf hists browser: Only offer symbol scripting when a symbol is under the cursor Arnaldo Carvalho de Melo
2016-01-26 19:19 ` Arnaldo Carvalho de Melo [this message]
2016-01-26 19:19 ` [PATCH 17/26] perf hists browser: Be a bit more strict about presenting CPU socket zoom Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 18/26] perf hists browser: Offer non-symbol specific menu options for --sort without 'sym' Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 19/26] perf machine: Introduce machine__find_kernel_symbol_by_name() Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 20/26] perf test: Fixup aliases checking in the 'vmlinux matches kallsyms' test Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 21/26] perf test: Add libbpf relocation checker Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 22/26] perf bpf: Check relocation target section Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 23/26] tools build: Allow subprojects select all feature checkers Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 24/26] perf build: Select all feature checkers for feature-dump Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 25/26] perf hists browser: Skip scripting when perf.data file not available Arnaldo Carvalho de Melo
2016-01-26 19:19 ` [PATCH 26/26] perf cpumap: Auto initialize cpu__max_{node,cpu} Arnaldo Carvalho de Melo
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=1453835955-14224-17-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=wangnan0@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).