[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-b1447a54f5b41eaf1cc469d9bd3834caa2ff9afb@git.kernel.org>
Date: Wed, 3 Feb 2016 02:11:58 -0800
From: tip-bot for Namhyung Kim <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, namhyung@...nel.org, wangnan0@...wei.com,
eranian@...gle.com, tglx@...utronix.de, mingo@...nel.org,
dsahern@...il.com, peterz@...radead.org,
linux-kernel@...r.kernel.org, andi@...stfloor.org, hpa@...or.com
Subject: [tip:perf/core] perf hists browser: Offer 'Zoom into DSO'/'
Map details' only when sort order has 'dso'
Commit-ID: b1447a54f5b41eaf1cc469d9bd3834caa2ff9afb
Gitweb: http://git.kernel.org/tip/b1447a54f5b41eaf1cc469d9bd3834caa2ff9afb
Author: Namhyung Kim <namhyung@...nel.org>
AuthorDate: Fri, 22 Jan 2016 11:22:41 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 26 Jan 2016 11:52:50 -0300
perf hists browser: Offer 'Zoom into DSO'/'Map details' only when sort order has 'dso'
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@...nel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>,
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Stephane Eranian <eranian@...gle.com>
Cc: Wang Nan <wangnan0@...wei.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@...hat.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 2801d80..e892106 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 09616f0..89a1273 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;
Powered by blists - more mailing lists