lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1456303616-26926-16-git-send-email-jolsa@kernel.org>
Date:	Wed, 24 Feb 2016 09:46:56 +0100
From:	Jiri Olsa <jolsa@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:	lkml <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>,
	Ingo Molnar <mingo@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Stephane Eranian <eranian@...gle.com>,
	Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH 15/15] perf mem: Add Intel DATALA memory events

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@...nel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ