Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Dec 2009 12:36:03 +0000 (UTC)
From:      Fabien Thomas <fabient@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r200406 - stable/8/sys/dev/hwpmc
Message-ID:  <200912111236.nBBCa3rY008576@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fabient
Date: Fri Dec 11 12:36:02 2009
New Revision: 200406
URL: http://svn.freebsd.org/changeset/base/200406

Log:
  MFC 196739:
  Add counters for the i7 architecture which were accidentally left
  out of the original commit of i7 support.  These are all the counters
  on pages A-32 and A-33 of the _Intel(R) 64 and IA32 Architectures
  Software Developer's Manual Vol 3B_, June 2009.  Almost all
  of these counters relate to operations on the L2 cache.

Modified:
  stable/8/sys/dev/hwpmc/hwpmc_core.c
  stable/8/sys/dev/hwpmc/pmc_events.h
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c
==============================================================================
--- stable/8/sys/dev/hwpmc/hwpmc_core.c	Fri Dec 11 11:07:48 2009	(r200405)
+++ stable/8/sys/dev/hwpmc/hwpmc_core.c	Fri Dec 11 12:36:02 2009	(r200406)
@@ -1182,6 +1182,29 @@ static struct iap_event_descr iap_events
     IAPDESCR(DBH_01H, 0xDB, 0x01, IAP_F_FM | IAP_F_I7),
     IAPDESCR(E4H_01H, 0xE4, 0x01, IAP_F_FM | IAP_F_I7),
     IAPDESCR(E5H_01H, 0xE5, 0x01, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(E6H_01H, 0xE6, 0x01, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(E6H_02H, 0xE6, 0x02, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(E8H_01H, 0xE8, 0x01, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(E8H_02H, 0xE8, 0x02, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(E8H_03H, 0xE8, 0x03, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F0H_01H, 0xF0, 0x01, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F0H_02H, 0xF0, 0x02, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F0H_04H, 0xF0, 0x04, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F0H_08H, 0xF0, 0x08, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F0H_10H, 0xF0, 0x10, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F0H_20H, 0xF0, 0x20, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F0H_40H, 0xF0, 0x40, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F0H_80H, 0xF0, 0x80, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F1H_02H, 0xF1, 0x02, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F1H_04H, 0xF1, 0x04, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F1H_07H, 0xF1, 0x07, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F2H_01H, 0xF2, 0x01, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F2H_02H, 0xF2, 0x02, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F2H_04H, 0xF2, 0x04, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F2H_08H, 0xF2, 0x08, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F2H_0FH, 0xF2, 0x0F, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F3H_01H, 0xF3, 0x01, IAP_F_FM | IAP_F_I7),
+    IAPDESCR(F3H_02H, 0xF3, 0x02, IAP_F_FM | IAP_F_I7),
     IAPDESCR(F3H_04H, 0xF3, 0x04, IAP_F_FM | IAP_F_I7),
     IAPDESCR(F3H_08H, 0xF3, 0x08, IAP_F_FM | IAP_F_I7),
     IAPDESCR(F3H_10H, 0xF3, 0x10, IAP_F_FM | IAP_F_I7),

Modified: stable/8/sys/dev/hwpmc/pmc_events.h
==============================================================================
--- stable/8/sys/dev/hwpmc/pmc_events.h	Fri Dec 11 11:07:48 2009	(r200405)
+++ stable/8/sys/dev/hwpmc/pmc_events.h	Fri Dec 11 12:36:02 2009	(r200406)
@@ -29,8 +29,18 @@
 #ifndef _DEV_HWPMC_PMC_EVENTS_H_
 #define	_DEV_HWPMC_PMC_EVENTS_H_
 
-/*
- * PMC event codes.
+/* 
+ * Note: Documentation on adding events can be found both in
+ * the source tree at src/share/doc/papers/hwpmc/hwpmc.ms
+ * as well as on-line at:
+ *
+ * http://wiki.freebsd.org/PmcTools/PmcHardwareHowTo
+ *
+ * Please refer to those resources before you attempt to modify
+ * this file or the hwpmc driver/subsystem.
+ */
+
+/* * PMC event codes.
  *
  * __PMC_EV(CLASS, SYMBOLIC-NAME)
  *
@@ -973,7 +983,30 @@ __PMC_EV(IAP, EVENT_FDH_04H)			\
 __PMC_EV(IAP, EVENT_FDH_08H)			\
 __PMC_EV(IAP, EVENT_FDH_10H)			\
 __PMC_EV(IAP, EVENT_FDH_20H)			\
-__PMC_EV(IAP, EVENT_FDH_40H)
+__PMC_EV(IAP, EVENT_FDH_40H)			\
+__PMC_EV(IAP, EVENT_E6H_02H)			\
+__PMC_EV(IAP, EVENT_E8H_01H)			\
+__PMC_EV(IAP, EVENT_E8H_02H)			\
+__PMC_EV(IAP, EVENT_E8H_03H)			\
+__PMC_EV(IAP, EVENT_F0H_01H)			\
+__PMC_EV(IAP, EVENT_F0H_02H)			\
+__PMC_EV(IAP, EVENT_F0H_04H)			\
+__PMC_EV(IAP, EVENT_F0H_08H)			\
+__PMC_EV(IAP, EVENT_F0H_10H)			\
+__PMC_EV(IAP, EVENT_F0H_20H)			\
+__PMC_EV(IAP, EVENT_F0H_40H)			\
+__PMC_EV(IAP, EVENT_F0H_80H)			\
+__PMC_EV(IAP, EVENT_F1H_02H)			\
+__PMC_EV(IAP, EVENT_F1H_04H)			\
+__PMC_EV(IAP, EVENT_F1H_07H)			\
+__PMC_EV(IAP, EVENT_F2H_01H)			\
+__PMC_EV(IAP, EVENT_F2H_02H)			\
+__PMC_EV(IAP, EVENT_F2H_04H)			\
+__PMC_EV(IAP, EVENT_F2H_08H)			\
+__PMC_EV(IAP, EVENT_F2H_0FH)			\
+__PMC_EV(IAP, EVENT_F3H_01H)			\
+__PMC_EV(IAP, EVENT_F3H_02H)			
+
 
 #define	PMC_EV_IAP_FIRST	PMC_EV_IAP_EVENT_02H_81H
 #define	PMC_EV_IAP_LAST		PMC_EV_IAP_EVENT_FDH_40H
@@ -1894,6 +1927,29 @@ __PMC_EV_ALIAS("UOP_UNFUSION",				IAP_EV
 __PMC_EV_ALIAS("BR_INST_DECODED",			IAP_EVENT_E0H_01H) \
 __PMC_EV_ALIAS("BOGUS_BR",				IAP_EVENT_E4H_01H) \
 __PMC_EV_ALIAS("BPU_MISSED_CALL_RET",			IAP_EVENT_E5H_01H) \
+__PMC_EV_ALIAS("BACLEAR.CLEAR",				IAP_EVENT_E6H_01H) \
+__PMC_EV_ALIAS("BACLEAR.BAD_TARGET",			IAP_EVENT_E6H_02H) \
+__PMC_EV_ALIAS("BPU_CLEARS.EARLY",			IAP_EVENT_E8H_01H) \
+__PMC_EV_ALIAS("BPU_CLEARS.LATE",			IAP_EVENT_E8H_02H) \
+__PMC_EV_ALIAS("BPU_CLEARS.ANY",			IAP_EVENT_E8H_03H) \
+__PMC_EV_ALIAS("L2_TRANSACTIONS.LOAD",			IAP_EVENT_F0H_01H) \
+__PMC_EV_ALIAS("L2_TRANSACTIONS.RFO",			IAP_EVENT_F0H_02H) \
+__PMC_EV_ALIAS("L2_TRANSACTIONS.IFETCH",		IAP_EVENT_F0H_04H) \
+__PMC_EV_ALIAS("L2_TRANSACTIONS.PREFETCH",		IAP_EVENT_F0H_08H) \
+__PMC_EV_ALIAS("L2_TRANSACTIONS.L1D_WB",		IAP_EVENT_F0H_10H) \
+__PMC_EV_ALIAS("L2_TRANSACTIONS.FILL",			IAP_EVENT_F0H_20H) \
+__PMC_EV_ALIAS("L2_TRANSACTIONS.WB",			IAP_EVENT_F0H_40H) \
+__PMC_EV_ALIAS("L2_TRANSACTIONS.ANY",			IAP_EVENT_F0H_80H) \
+__PMC_EV_ALIAS("L2_LINES_IN.S_STATE",			IAP_EVENT_F1H_02H) \
+__PMC_EV_ALIAS("L2_LINES_IN.E_STATE",			IAP_EVENT_F1H_04H) \
+__PMC_EV_ALIAS("L2_LINES_IN.ANY",			IAP_EVENT_F1H_07H) \
+__PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_CLEAN",		IAP_EVENT_F2H_01H) \
+__PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_DIRTY",		IAP_EVENT_F2H_02H) \
+__PMC_EV_ALIAS("L2_LINES_OUT.PREFETCH_CLEAN",		IAP_EVENT_F2H_04H) \
+__PMC_EV_ALIAS("L2_LINES_OUT.PREFETCH_DIRTY",		IAP_EVENT_F2H_08H) \
+__PMC_EV_ALIAS("L2_LINES_OUT.ANY",			IAP_EVENT_F2H_0FH) \
+__PMC_EV_ALIAS("L2_HW_PREFETCH.HIT",			IAP_EVENT_F3H_01H) \
+__PMC_EV_ALIAS("L2_HW_PREFETCH.ALLOC",			IAP_EVENT_F3H_02H) \
 __PMC_EV_ALIAS("L2_HW_PREFETCH.DATA_TRIGGER",		IAP_EVENT_F3H_04H) \
 __PMC_EV_ALIAS("L2_HW_PREFETCH.CODE_TRIGGER",		IAP_EVENT_F3H_08H) \
 __PMC_EV_ALIAS("L2_HW_PREFETCH.DCA_TRIGGER",		IAP_EVENT_F3H_10H) \



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