Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Aug 2013 06:08:52 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254476 - head/sys/dev/hwpmc
Message-ID:  <201308180608.r7I68qKF031513@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sun Aug 18 06:08:52 2013
New Revision: 254476
URL: http://svnweb.freebsd.org/changeset/base/254476

Log:
  Add in missing events for Sandy Bridge Xeon.
  
  * Add in MEM_LOAD_UOPS_LLC_HIT_RETIRED for both sandy bridge and sandy
    bridge Xeon.  Right now it only is enabled for Sandy Bridge.
  * D2/0F is actually a combination rather than a separate counter, so
    just flip that on for the CPU types that support it.
  
  There's an errata for using this on SB Xeon hardware - I've documented
  it in kern/181346.
  
  Tested:
  
  * Sandy Bridge
  * Sandy Bridge Xeon
  
  Sponsored by:	Netflix, Inc.

Modified:
  head/sys/dev/hwpmc/hwpmc_core.c
  head/sys/dev/hwpmc/pmc_events.h

Modified: head/sys/dev/hwpmc/hwpmc_core.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_core.c	Sun Aug 18 04:22:13 2013	(r254475)
+++ head/sys/dev/hwpmc/hwpmc_core.c	Sun Aug 18 06:08:52 2013	(r254476)
@@ -1541,15 +1541,21 @@ static struct iap_event_descr iap_events
 	IAP_F_SBX | IAP_F_IBX | IAP_F_HW),
 
     IAPDESCR(D2H_01H, 0xD2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |
-	IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_IBX | IAP_F_HW),
+	IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB |
+	IAP_F_IBX | IAP_F_HW),
     IAPDESCR(D2H_02H, 0xD2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |
-	IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_IBX | IAP_F_HW),
+	IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB |
+	IAP_F_IBX | IAP_F_HW),
     IAPDESCR(D2H_04H, 0xD2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |
-	IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_IBX | IAP_F_HW),
+	IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB |
+	IAP_F_IBX | IAP_F_HW),
     IAPDESCR(D2H_08H, 0xD2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |
-	IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_IBX | IAP_F_HW),
+	IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB |
+	IAP_F_IBX | IAP_F_HW),
     IAPDESCR(D2H_0FH, 0xD2, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2 |
-	IAP_F_I7 | IAP_F_WM),
+	IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB |
+	IAP_F_IBX | IAP_F_HW),
+
     IAPDESCR(D2H_10H, 0xD2, 0x10, IAP_F_FM | IAP_F_CC2E),
 
     IAPDESCR(D3H_01H, 0xD3, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_SBX |

Modified: head/sys/dev/hwpmc/pmc_events.h
==============================================================================
--- head/sys/dev/hwpmc/pmc_events.h	Sun Aug 18 04:22:13 2013	(r254475)
+++ head/sys/dev/hwpmc/pmc_events.h	Sun Aug 18 06:08:52 2013	(r254476)
@@ -2656,6 +2656,8 @@ __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RE
     IAP_EVENT_D2H_04H)							\
 __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE",		\
     IAP_EVENT_D2H_08H)							\
+__PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RETIRED.ALL",			\
+    IAP_EVENT_D2H_0FH)							\
 __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM",		\
     IAP_EVENT_D3H_01H)							\
 __PMC_EV_ALIAS("BACLEARS.ANY", IAP_EVENT_E6H_1FH)			\
@@ -2859,6 +2861,8 @@ __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RE
     IAP_EVENT_D2H_04H)							\
 __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE",		\
     IAP_EVENT_D2H_08H)							\
+__PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RETIRED.ALL",			\
+    IAP_EVENT_D2H_0FH)							\
 __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM",		\
     IAP_EVENT_D3H_01H)							\
 __PMC_EV_ALIAS("L2_TRANS.DEMAND_DATA_RD", IAP_EVENT_F0H_01H)		\
@@ -3524,6 +3528,18 @@ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2
 __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H)      \
 __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_MISS", IAP_EVENT_D1H_20H)     \
 __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.HIT_LFB", IAP_EVENT_D1H_40H)      \
+__PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS",		\
+    IAP_EVENT_D2H_01H)							\
+__PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT",		\
+    IAP_EVENT_D2H_02H)							\
+__PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM",		\
+    IAP_EVENT_D2H_04H)							\
+__PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE",		\
+    IAP_EVENT_D2H_08H)							\
+__PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RETIRED.ALL",			\
+    IAP_EVENT_D2H_0FH)							\
+__PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_HIT_RETIRED.LLC_MISS",		\
+    IAP_EVENT_D4H_02H)							\
 __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM",		\
     IAP_EVENT_D3H_01H)							\
 __PMC_EV_ALIAS("MEM_LOAD_UOPS_LLC_MISS_RETIRED.REMOTE_DRAM",		\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308180608.r7I68qKF031513>