From: Jiri Olsa <jolsa@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Stephane Eranian <eranian@google.com>,
Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 15/15] perf mem: Add Intel DATALA memory events
Date: Wed, 24 Feb 2016 09:46:56 +0100 [thread overview]
Message-ID: <1456303616-26926-16-git-send-email-jolsa@kernel.org> (raw)
In-Reply-To: <1456303616-26926-1-git-send-email-jolsa@kernel.org>
Adding Intel DATALA memory events into
perf mem record command:
$ perf mem record -e list
ldlat-loads : available
ldlat-stores : available
stlb-miss-loads
stlb-miss-stores
lock-loads
split-loads
split-stores
all-loads
all-stores
l1-hit
l2-hit
l3-hit
l1-miss
l2-miss
l3-miss
lfb
snp-miss
snp-hit
snp-hitm
snp-none
local-dram
All events from above lists are compiled in, but only
those with [ok] are supported by kernel/HW. You need
previous DATALA patch to support all of them.
Link: http://lkml.kernel.org/n/tip-cximteb8r1a6750wz8sgeajh@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/perf/builtin-mem.c | 4 ++--
tools/perf/util/mem-events.c | 19 +++++++++++++++++++
tools/perf/util/mem-events.h | 19 +++++++++++++++++++
3 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-mem.c b/tools/perf/builtin-mem.c
index 8a31b3f634d9..03c33c0b761b 100644
--- a/tools/perf/builtin-mem.c
+++ b/tools/perf/builtin-mem.c
@@ -40,9 +40,9 @@ static int parse_record_events(const struct option *opt,
for (j = 0; j < PERF_MEM_EVENTS__MAX; j++) {
struct perf_mem_event *e = &perf_mem_events[j];
- fprintf(stderr, "%-13s%-*s%s\n",
+ fprintf(stderr, "%-17s%-*s%s\n",
e->tag,
- verbose ? 25 : 0,
+ verbose ? 27 : 0,
verbose ? perf_mem_events__name(j) : "",
e->supported ? ": available" : "");
}
diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c
index a15e5020884d..31e079a1ab7b 100644
--- a/tools/perf/util/mem-events.c
+++ b/tools/perf/util/mem-events.c
@@ -17,6 +17,25 @@ unsigned int perf_mem_events__loads_ldlat = 30;
struct perf_mem_event perf_mem_events[PERF_MEM_EVENTS__MAX] = {
E("ldlat-loads", "cpu/mem-loads,ldlat=%u/P", "mem-loads"),
E("ldlat-stores", "cpu/mem-stores/P", "mem-stores"),
+ E("stlb-miss-loads", "cpu/mem-stlb-miss-loads/P", "mem-stlb-miss-loads"),
+ E("stlb-miss-stores", "cpu/mem-stlb-miss-stores/P", "mem-stlb-miss-stores"),
+ E("lock-loads", "cpu/mem-lock-loads/P", "mem-lock-loads"),
+ E("split-loads", "cpu/mem-split-loads/P", "mem-split-loads"),
+ E("split-stores", "cpu/mem-split-stores/P", "mem-split-stores"),
+ E("all-loads", "cpu/mem-all-loads/P", "mem-all-loads"),
+ E("all-stores", "cpu/mem-all-stores/P", "mem-all-stores"),
+ E("l1-hit", "cpu/mem-load-l1-hit/P", "mem-load-l1-hit"),
+ E("l2-hit", "cpu/mem-load-l2-hit/P", "mem-load-l2-hit"),
+ E("l3-hit", "cpu/mem-load-l3-hit/P", "mem-load-l3-hit"),
+ E("l1-miss", "cpu/mem-load-l1-miss/P", "mem-load-l1-miss"),
+ E("l2-miss", "cpu/mem-load-l2-miss/P", "mem-load-l2-miss"),
+ E("l3-miss", "cpu/mem-load-l3-miss/P", "mem-load-l3-miss"),
+ E("lfb", "cpu/mem-load-hit-lfb/P", "mem-load-hit-lfb"),
+ E("snp-miss", "cpu/mem-snp-miss/P", "mem-snp-miss"),
+ E("snp-hit", "cpu/mem-snp-hit/P", "mem-snp-hit"),
+ E("snp-hitm", "cpu/mem-snp-hitm/P", "mem-snp-hitm"),
+ E("snp-none", "cpu/mem-snp-none/P", "mem-snp-none"),
+ E("local-dram", "cpu/mem-local-dram/P", "mem-local-dram"),
};
#undef E
diff --git a/tools/perf/util/mem-events.h b/tools/perf/util/mem-events.h
index 7f69bf9d789d..939786ffab2a 100644
--- a/tools/perf/util/mem-events.h
+++ b/tools/perf/util/mem-events.h
@@ -14,6 +14,25 @@ struct perf_mem_event {
enum {
PERF_MEM_EVENTS__LOAD,
PERF_MEM_EVENTS__STORE,
+ PERF_MEM_EVENTS__STLB_MISS_LOADS,
+ PERF_MEM_EVENTS__STLB_MISS_STORES,
+ PERF_MEM_EVENTS__LOCK_LOADS,
+ PERF_MEM_EVENTS__SPLIT_LOADS,
+ PERF_MEM_EVENTS__SPLIT_STORES,
+ PERF_MEM_EVENTS__ALL_LOADS,
+ PERF_MEM_EVENTS__ALL_STORES,
+ PERF_MEM_EVENTS__L1_HIT,
+ PERF_MEM_EVENTS__L2_HIT,
+ PERF_MEM_EVENTS__L3_HIT,
+ PERF_MEM_EVENTS__L1_MISS,
+ PERF_MEM_EVENTS__L2_MISS,
+ PERF_MEM_EVENTS__L3_MISS,
+ PERF_MEM_EVENTS__LFB,
+ PERF_MEM_EVENTS__SNP_MISS,
+ PERF_MEM_EVENTS__SNP_HIT,
+ PERF_MEM_EVENTS__SNP_HITM,
+ PERF_MEM_EVENTS__SNP_NONE,
+ PERF_MEM_EVENTS__LOCAL_DRAM,
PERF_MEM_EVENTS__MAX,
};
--
2.4.3
prev parent reply other threads:[~2016-02-24 8:48 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 8:46 [PATCHv2 00/15] perf tools: Several memory events updates Jiri Olsa
2016-02-24 8:46 ` [PATCH 01/15] perf mem: Check for memory events support Jiri Olsa
2016-02-25 7:36 ` [tip:perf/core] perf mem record: " tip-bot for Jiri Olsa
2016-02-24 8:46 ` [PATCH 02/15] perf mem: Introduce perf_mem_events__name function Jiri Olsa
2016-02-25 7:36 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-02-24 8:46 ` [PATCH 03/15] perf mem: Add -l/--ldlat option Jiri Olsa
2016-02-24 13:14 ` Arnaldo Carvalho de Melo
2016-02-24 19:16 ` Jiri Olsa
2016-02-24 8:46 ` [PATCH 04/15] perf mem: Add -u/-k options Jiri Olsa
2016-02-24 13:17 ` Arnaldo Carvalho de Melo
2016-02-24 19:17 ` Jiri Olsa
2016-02-24 8:46 ` [PATCH 05/15] perf tools: Introduce perf_mem__tlb_scnprintf function Jiri Olsa
2016-02-24 13:18 ` Arnaldo Carvalho de Melo
2016-02-25 7:37 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-02-24 8:46 ` [PATCH 06/15] perf tools: Introduce perf_mem__lvl_scnprintf function Jiri Olsa
2016-02-25 7:37 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-02-24 8:46 ` [PATCH 07/15] perf tools: Introduce perf_mem__snp_scnprintf function Jiri Olsa
2016-02-25 7:37 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-02-24 8:46 ` [PATCH 08/15] perf tools: Introduce perf_mem__lck_scnprintf function Jiri Olsa
2016-02-25 7:38 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-02-24 8:46 ` [PATCH 09/15] perf tools: Change perf_mem__tlb_scnprintf to return nb of displayed bytes Jiri Olsa
2016-02-25 7:38 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-02-24 8:46 ` [PATCH 10/15] perf tools: Change perf_mem__lvl_scnprintf " Jiri Olsa
2016-02-25 7:38 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-02-24 8:46 ` [PATCH 11/15] perf tools: Change perf_mem__snp_scnprintf " Jiri Olsa
2016-02-25 7:39 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-02-24 8:46 ` [PATCH 12/15] perf tools: Change perf_mem__lck_scnprintf " Jiri Olsa
2016-02-25 7:39 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-02-24 8:46 ` [PATCH 13/15] perf script: Display data_src values Jiri Olsa
2016-02-24 13:34 ` Arnaldo Carvalho de Melo
2016-02-24 19:18 ` Jiri Olsa
2016-02-25 7:39 ` [tip:perf/core] " tip-bot for Jiri Olsa
2016-02-24 8:46 ` [PATCH 14/15] perf x86 intel: Add DATALA events into sysfs Jiri Olsa
2016-02-24 15:59 ` Andi Kleen
2016-02-24 18:54 ` Jiri Olsa
2016-02-24 8:46 ` Jiri Olsa [this message]
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=1456303616-26926-16-git-send-email-jolsa@kernel.org \
--to=jolsa@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=dsahern@gmail.com \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.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