[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-inykbom2f19difvsu1e18avr@git.kernel.org>
Date: Sat, 22 Oct 2016 01:53:12 -0700
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: dsahern@...il.com, acme@...hat.com, namhyung@...nel.org,
a.p.zijlstra@...llo.nl, jolsa@...nel.org, tglx@...utronix.de,
dzickus@...hat.com, andi@...stfloor.org, mingo@...nel.org,
hpa@...or.com, jmario@...hat.com, linux-kernel@...r.kernel.org
Subject: [tip:perf/core] perf c2c report: Limit the cachelines table entries
Commit-ID: 9857b7173cf420654a7a78a2cdf972ddb380a8a1
Gitweb: http://git.kernel.org/tip/9857b7173cf420654a7a78a2cdf972ddb380a8a1
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Wed, 17 Aug 2016 14:55:23 +0200
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 21 Oct 2016 10:31:57 -0300
perf c2c report: Limit the cachelines table entries
Add a limit for entries number of the cachelines table entries. By
default now it's the 0.0005% minimum of remote HITMs.
Also display only cachelines with remote hitm or store data.
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Don Zickus <dzickus@...hat.com>
Cc: Joe Mario <jmario@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/n/tip-inykbom2f19difvsu1e18avr@git.kernel.org
[ Disabled for now ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/builtin-c2c.c | 37 ++++++++++++++++++++++++++++++++++++-
tools/perf/util/hist.c | 1 +
tools/perf/util/hist.h | 1 +
3 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 950a412..92b3b81 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -1642,11 +1642,45 @@ static int c2c_hists__reinit(struct c2c_hists *c2c_hists,
return hpp_list__parse(&c2c_hists->list, output, sort);
}
+#define DISPLAY_LINE_LIMIT 0.0005
+
+static bool he__display(struct hist_entry *he, struct c2c_stats *stats)
+{
+ struct c2c_hist_entry *c2c_he;
+ double ld_dist;
+
+ /* XXX Disabled for now, till we get a command line switch to control this */
+ return true;
+
+ c2c_he = container_of(he, struct c2c_hist_entry, he);
+
+ if (stats->rmt_hitm) {
+ ld_dist = ((double)c2c_he->stats.rmt_hitm / stats->rmt_hitm);
+ if (ld_dist < DISPLAY_LINE_LIMIT)
+ he->filtered = HIST_FILTER__C2C;
+ } else {
+ he->filtered = HIST_FILTER__C2C;
+ }
+
+ return he->filtered == 0;
+}
+
+static inline int valid_hitm_or_store(struct hist_entry *he)
+{
+ struct c2c_hist_entry *c2c_he;
+
+ c2c_he = container_of(he, struct c2c_hist_entry, he);
+ return c2c_he->stats.rmt_hitm || c2c_he->stats.store;
+}
+
static int filter_cb(struct hist_entry *he)
{
if (c2c.show_src && !he->srcline)
he->srcline = hist_entry__get_srcline(he);
+ if (!valid_hitm_or_store(he))
+ he->filtered = HIST_FILTER__C2C;
+
return 0;
}
@@ -1654,11 +1688,12 @@ static int resort_cl_cb(struct hist_entry *he)
{
struct c2c_hist_entry *c2c_he;
struct c2c_hists *c2c_hists;
+ bool display = he__display(he, &c2c.hitm_stats);
c2c_he = container_of(he, struct c2c_hist_entry, he);
c2c_hists = c2c_he->hists;
- if (c2c_hists) {
+ if (display && c2c_hists) {
c2c_hists__reinit(c2c_hists,
"percent_rmt_hitm,"
"percent_lcl_hitm,"
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index b02992e..e1be413 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1195,6 +1195,7 @@ static void hist_entry__check_and_remove_filter(struct hist_entry *he,
case HIST_FILTER__GUEST:
case HIST_FILTER__HOST:
case HIST_FILTER__SOCKET:
+ case HIST_FILTER__C2C:
default:
return;
}
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 9928fed..d4b6514 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -22,6 +22,7 @@ enum hist_filter {
HIST_FILTER__GUEST,
HIST_FILTER__HOST,
HIST_FILTER__SOCKET,
+ HIST_FILTER__C2C,
};
enum hist_column {
Powered by blists - more mailing lists