mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: mingo@kernel.org, tglx@linutronix.de, ak@linux.intel.com,
	eranian@google.com, dzickus@redhat.com, andi@firstfloor.org,
	jmario@redhat.com, acme@kernel.org
Cc: linux-kernel@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>
Subject: [PATCH 3/3] perf,x86: Add HSW offcore NUMA events
Date: Tue, 28 Oct 2014 13:30:46 +0100	[thread overview]
Message-ID: <20141028123352.632326435@infradead.org> (raw)
In-Reply-To: <20141028123043.257488788@infradead.org>

[-- Attachment #1: peterz-hsw-offcore-node.patch --]
[-- Type: text/plain, Size: 2000 bytes --]

Based on the actual HSW offcore bits, we can construct the full NODE
event set in a similar manner to the other uarchs (NHM/SNB).

Fixes: 86a349a28b24 ("perf/x86/intel: Add Broadwell core support")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 arch/x86/kernel/cpu/perf_event_intel.c |   33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

--- a/arch/x86/kernel/cpu/perf_event_intel.c
+++ b/arch/x86/kernel/cpu/perf_event_intel.c
@@ -513,6 +513,20 @@ static __initconst const u64 hsw_hw_cach
 		[ C(RESULT_MISS)   ] = -1,
 	},
  },
+ [ C(NODE) ] = {
+	[ C(OP_READ) ] = {
+		[ C(RESULT_ACCESS) ] = 0x01b7,
+		[ C(RESULT_MISS)   ] = 0x01b7,
+	},
+	[ C(OP_WRITE) ] = {
+		[ C(RESULT_ACCESS) ] = 0x01b7,
+		[ C(RESULT_MISS)   ] = 0x01b7,
+	},
+	[ C(OP_PREFETCH) ] = {
+		[ C(RESULT_ACCESS) ] = 0x01b7,
+		[ C(RESULT_MISS)   ] = 0x01b7,
+	},
+ },
 };
 
 #define HSW_DEMAND_DATA_RD		BIT_ULL(0)
@@ -588,6 +602,11 @@ static __initconst const u64 hsw_hw_cach
 #define HSW_DMND_WRITE			(HSW_ALL_RFO)
 #define HSW_DMND_PREFETCH		(HSW_ALL_PF_DATA|HSW_ALL_PF_RFO)
 
+#define HSW_DRAM_ANY			(HSW_L3_MISS)
+#define HSW_DRAM_REMOTE			(HSW_L3_MISS_REMOTE_HOP0_DRAM|		\
+					 HSW_L3_MISS_REMOTE_HOP1_DRAM|		\
+					 HSW_L3_MISS_REMOTE_HOP2P_DRAM)
+
 #define HSW_LLC_ACCESS			(HSW_ANY_RESPONSE)
 #define HSW_LLC_MISS			(HSW_L3_MISS)
 
@@ -610,6 +629,20 @@ static __initconst const u64 hsw_hw_cach
 		[ C(RESULT_MISS)   ] = HSW_DMND_PREFETCH|HSW_LLC_MISS
 	},
  },
+ [ C(NODE) ] = {
+	[ C(OP_READ) ] = {
+		[ C(RESULT_ACCESS) ] = HSW_DMND_READ|HSW_DRAM_ANY,
+		[ C(RESULT_MISS)   ] = HSW_DMND_READ|HSW_DRAM_REMOTE,
+	},
+	[ C(OP_WRITE) ] = {
+		[ C(RESULT_ACCESS) ] = HSW_DMND_WRITE|HSW_DRAM_ANY,
+		[ C(RESULT_MISS)   ] = HSW_DMND_WRITE|HSW_DRAM_REMOTE,
+	},
+	[ C(OP_PREFETCH) ] = {
+		[ C(RESULT_ACCESS) ] = HSW_DMND_PREFETCH|HSW_DRAM_ANY,
+		[ C(RESULT_MISS)   ] = HSW_DMND_PREFETCH|HSW_DRAM_REMOTE,
+	},
+ },
 };
 
 static __initconst const u64 westmere_hw_cache_event_ids



  parent reply	other threads:[~2014-10-28 12:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-28 12:30 [PATCH 0/3] Cleanup of the HSW offcore bits Peter Zijlstra
2014-10-28 12:30 ` [PATCH 1/3] perf,x86: De-obfuscate " Peter Zijlstra
2014-10-28 13:04   ` Andi Kleen
2014-10-28 12:30 ` [PATCH 2/3] perf,x86: Sanitize HSW offcore events Peter Zijlstra
2014-10-28 12:30 ` Peter Zijlstra [this message]
2014-10-28 13:10   ` [PATCH 3/3] perf,x86: Add HSW offcore NUMA events Andi Kleen

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=20141028123352.632326435@infradead.org \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=dzickus@redhat.com \
    --cc=eranian@google.com \
    --cc=jmario@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome