linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf/x86/intel: Add hardware cache event support for Intel Gemini Lake
@ 2017-04-13  8:19 Yunying Sun
  2017-04-13 13:45 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Yunying Sun @ 2017-04-13  8:19 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Andi Kleen, Alexander Shishkin, linux-kernel, vince, eranian,
	Arnaldo Carvalho de Melo, Yunying Sun

Gemini Lake is a Goldmont core based Apollo Lake successor with better
CPU performance. Currently there is no hardware cache events available
if checking with "perf list cache" on Gemini Lake. Perf hardware cache
event test always fail because of this.

This patch adds INTEL_FAM6_ATOM_GEMINI_LAKE case to use same Goldmont
hardware cache events table for Gemini Lake. With this patch, below
hardware cache events are available on Gemini Lake, and perf hardware
cache event test can pass.

L1-dcache-loads
L1-dcache-stores
L1-icache-load-misses
L1-icache-loads
LLC-load-misses
LLC-loads
LLC-prefetch-misses
LLC-prefetches
LLC-store-misses
LLC-stores
branch-load-misses
branch-loads
dTLB-loads
dTLB-stores
iTLB-load-misses
iTLB-loads

Signed-off-by: Yunying Sun <yunying.sun@intel.com>
Tested-by: Yunying Sun <yunying.sun@intel.com>
---
 arch/x86/events/intel/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index eb1484c..f80c3a3 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -3731,6 +3731,7 @@ __init int intel_pmu_init(void)
 
 	case INTEL_FAM6_ATOM_GOLDMONT:
 	case INTEL_FAM6_ATOM_DENVERTON:
+	case INTEL_FAM6_ATOM_GEMINI_LAKE:
 		memcpy(hw_cache_event_ids, glm_hw_cache_event_ids,
 		       sizeof(hw_cache_event_ids));
 		memcpy(hw_cache_extra_regs, glm_hw_cache_extra_regs,
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] perf/x86/intel: Add hardware cache event support for Intel Gemini Lake
  2017-04-13  8:19 [PATCH] perf/x86/intel: Add hardware cache event support for Intel Gemini Lake Yunying Sun
@ 2017-04-13 13:45 ` Andi Kleen
  0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2017-04-13 13:45 UTC (permalink / raw)
  To: Yunying Sun
  Cc: Peter Zijlstra, Alexander Shishkin, linux-kernel, vince, eranian,
	Arnaldo Carvalho de Melo, kan.liang

On Thu, Apr 13, 2017 at 04:19:13PM +0800, Yunying Sun wrote:
> Gemini Lake is a Goldmont core based Apollo Lake successor with better
> CPU performance. Currently there is no hardware cache events available
> if checking with "perf list cache" on Gemini Lake. Perf hardware cache
> event test always fail because of this.
> 
> This patch adds INTEL_FAM6_ATOM_GEMINI_LAKE case to use same Goldmont
> hardware cache events table for Gemini Lake. With this patch, below
> hardware cache events are available on Gemini Lake, and perf hardware
> cache event test can pass.

Gemini Lake needs more changes. Kan has been working on a more complete
patch kit.

-Andi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-13 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-13  8:19 [PATCH] perf/x86/intel: Add hardware cache event support for Intel Gemini Lake Yunying Sun
2017-04-13 13:45 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).