Skip to contentSkip to conversation

perf tool: Add non-architectural event aliases

RFC Superseded Jiri Olsa 4 participants 11 messages Dec 17, 2012 – Dec 22, 2012 perf events

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jiri Olsa

author
#0 lore raw

cover perf tool: Add non-architectural event aliases

hi,
adding support to use non-architectural events in perf via name.

Attached patches:
1/3 perf tool: Add '.' as part of the event 'name' token 2/3 perf tool: Add support to include non architectural event aliases 3/3 perf tool: Add non arch events for SandyBridge microarchitecture

Basically, the pmu alias code detects the architecture and tries to find 'events' directory with non-architectural aliases.

For each non-architectural event there needs to be special file containig the event definition using pmu 'format' style, like:

  $ cat arch/x86/events/intel/SandyBridge/DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK 
  event=0x8,umask=0x1

Patch 3 contains part (not whole!) of aliases for SandyBridge microarch (Intel naming style is used) and can be used like:

  $ perf record -e 'cpu/DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK/' ls

The non-architectural event aliases could be part of the kernel as well as architectural events, under some other 'events' sysfs attribute.. I wasn't sure though.. looks like lot of perf data ;-)

any comments are welcome,
jirka

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/arch/x86/Makefile                       | 11 +++
 .../x86/events/intel/SandyBridge/ARITH.FPU_DIV_ACT |  1 +
 .../intel/SandyBridge/BR_INST_EXEC.ALL_BRANCHES    |  1 +
 .../x86/events/intel/SandyBridge/BR_INST_EXEC.COND |  1 +
 .../intel/SandyBridge/BR_INST_EXEC.DIRECT_JMP      |  1 +
 .../SandyBridge/BR_INST_EXEC.DIRECT_NEAR_CALL      |  1 +
 .../BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET         |  1 +
 .../SandyBridge/BR_INST_EXEC.INDIRECT_NEAR_CALL    |  1 +
 .../events/intel/SandyBridge/BR_INST_EXEC.NONTAKEN |  1 +
 .../intel/SandyBridge/BR_INST_EXEC.RETURN_NEAR     |  1 +
 .../events/intel/SandyBridge/BR_INST_EXEC.TAKEN    |  1 +
 .../intel/SandyBridge/BR_MISP_EXEC.ALL_BRANCHES    |  1 +
 .../x86/events/intel/SandyBridge/BR_MISP_EXEC.COND |  1 +
 .../SandyBridge/BR_MISP_EXEC.DIRECT_NEAR_CALL      |  1 +
 .../BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET         |  1 +
 .../SandyBridge/BR_MISP_EXEC.INDIRECT_NEAR_CALL    |  1 +
 .../events/intel/SandyBridge/BR_MISP_EXEC.NONTAKEN |  1 +
 .../intel/SandyBridge/BR_MISP_EXEC.RETURN_NEAR     |  1 +
 .../events/intel/SandyBridge/BR_MISP_EXEC.TAKEN    |  1 +
 .../x86/events/intel/SandyBridge/CPL_CYCLES.RING0  |  1 +
 .../events/intel/SandyBridge/CPL_CYCLES.RING123    |  1 +
 .../SandyBridge/CPU_CLK_THREAD_UNHALTED.REF_XCLK   |  1 +
 .../intel/SandyBridge/CPU_CLK_UNHALTED.THREAD_P    |  1 +
 .../DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK            |  1 +
 .../intel/SandyBridge/DTLB_LOAD_MISSES.STLB_HIT    |  1 +
 .../SandyBridge/DTLB_LOAD_MISSES.WALK_COMPLETED    |  1 +
 .../SandyBridge/DTLB_LOAD_MISSES.WALK_DURATION     |  1 +
 .../DTLB_STORE_MISSES.MISS_CAUSES_A_WALK           |  1 +
 .../intel/SandyBridge/DTLB_STORE_MISSES.STLB_HIT   |  1 +
 .../SandyBridge/DTLB_STORE_MISSES.WALK_COMPLETED   |  1 +
 .../SandyBridge/DTLB_STORE_MISSES.WALK_DURATION    |  1 +
 .../FP_COMP_OPS_EXE.SSE_FP_PACKED_DOUBLE           |  1 +
 .../FP_COMP_OPS_EXE.SSE_FP_SCALAR_SINGLE           |  1 +
 .../SandyBridge/FP_COMP_OPS_EXE.SSE_PACKED_SINGLE  |  1 +
 .../SandyBridge/FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE  |  1 +
 .../events/intel/SandyBridge/FP_COMP_OPS_EXE.X87   |  1 +
 .../events/intel/SandyBridge/HW_PRE_REQ.DL1_MISS   |  1 +
 .../x86/events/intel/SandyBridge/ICACHE.MISSES     |  1 +
 .../arch/x86/events/intel/SandyBridge/IDQ.DSB_UOPS |  1 +
 .../arch/x86/events/intel/SandyBridge/IDQ.EMPTY    |  1 +
 .../x86/events/intel/SandyBridge/IDQ.MITE_UOPS     |  1 +
 .../x86/events/intel/SandyBridge/IDQ.MS_DSB_UOPS   |  1 +
 .../x86/events/intel/SandyBridge/IDQ.MS_MITE_UOPS  |  1 +
 .../arch/x86/events/intel/SandyBridge/IDQ.MS_UOPS  |  1 +
 .../intel/SandyBridge/IDQ_UOPS_NOT_DELIVERED.CORE  |  1 +
 .../x86/events/intel/SandyBridge/ILD_STALL.IQ_FULL |  1 +
 .../x86/events/intel/SandyBridge/ILD_STALL.LCP     |  1 +
 .../intel/SandyBridge/INSTS_WRITTEN_TO_IQ.INSTS    |  1 +
 .../intel/SandyBridge/INT_MISC.RAT_STALL_CYCLES    |  1 +
 .../intel/SandyBridge/INT_MISC.RECOVERY_CYCLES     |  1 +
 .../SandyBridge/ITLB_MISSES.MISS_CAUSES_A_WALK     |  1 +
 .../events/intel/SandyBridge/ITLB_MISSES.STLB_HIT  |  1 +
 .../intel/SandyBridge/ITLB_MISSES.WALK_COMPLETED   |  1 +
 .../intel/SandyBridge/ITLB_MISSES.WALK_DURATION    |  1 +
 .../events/intel/SandyBridge/L1D.ALLOCATED_IN_M    |  1 +
 .../events/intel/SandyBridge/L1D.ALL_M_REPLACEMENT |  1 +
 .../arch/x86/events/intel/SandyBridge/L1D.EVICTION |  1 +
 .../x86/events/intel/SandyBridge/L1D.REPLACEMENT   |  1 +
 .../events/intel/SandyBridge/L1D_PEND_MISS.PENDING |  1 +
 .../events/intel/SandyBridge/L2_L1D_WB_RQSTS.ALL   |  1 +
 .../events/intel/SandyBridge/L2_L1D_WB_RQSTS.HIT_E |  1 +
 .../events/intel/SandyBridge/L2_L1D_WB_RQSTS.HIT_M |  1 +
 .../events/intel/SandyBridge/L2_L1D_WB_RQSTS.HIT_S |  1 +
 .../events/intel/SandyBridge/L2_L1D_WB_RQSTS.MISS  |  1 +
 .../events/intel/SandyBridge/L2_RQSTS.ALL_CODE_RD  |  1 +
 .../intel/SandyBridge/L2_RQSTS.ALL_DEMAND_DATA_RD  |  1 +
 .../x86/events/intel/SandyBridge/L2_RQSTS.ALL_PF   |  1 +
 .../x86/events/intel/SandyBridge/L2_RQSTS.ALL_RFO  |  1 +
 .../events/intel/SandyBridge/L2_RQSTS.CODE_RD_HIT  |  1 +
 .../events/intel/SandyBridge/L2_RQSTS.CODE_RD_MISS |  1 +
 .../intel/SandyBridge/L2_RQSTS.DEMAND_DATA_RD_HIT  |  1 +
 .../x86/events/intel/SandyBridge/L2_RQSTS.PF_HIT   |  1 +
 .../x86/events/intel/SandyBridge/L2_RQSTS.PF_MISS  |  1 +
 .../x86/events/intel/SandyBridge/L2_RQSTS.RFO_HITS |  1 +
 .../x86/events/intel/SandyBridge/L2_RQSTS.RFO_MISS |  1 +
 .../intel/SandyBridge/L2_STORE_LOCK_RQSTS.ALL      |  1 +
 .../intel/SandyBridge/L2_STORE_LOCK_RQSTS.HIT_E    |  1 +
 .../intel/SandyBridge/L2_STORE_LOCK_RQSTS.HIT_M    |  1 +
 .../intel/SandyBridge/L2_STORE_LOCK_RQSTS.MISS     |  1 +
 .../events/intel/SandyBridge/LD_BLOCKS.ALL_BLOCK   |  1 +
 .../intel/SandyBridge/LD_BLOCKS.DATA_UNKNOWN       |  1 +
 .../x86/events/intel/SandyBridge/LD_BLOCKS.NO_SR   |  1 +
 .../intel/SandyBridge/LD_BLOCKS.STORE_FORWARD      |  1 +
 .../SandyBridge/LD_BLOCKS_PARTIAL.ADDRESS_ALIAS    |  1 +
 .../SandyBridge/LD_BLOCKS_PARTIAL.ALL_STA_BLOCK    |  1 +
 .../events/intel/SandyBridge/LOAD_HIT_PRE.HW_PF    |  1 +
 .../events/intel/SandyBridge/LOAD_HIT_PRE.SW_PF    |  1 +
 .../SandyBridge/LOCK_CYCLES.CACHE_LOCK_DURATION    |  1 +
 .../LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION        |  1 +
 .../intel/SandyBridge/LONGEST_LAT_CACHE.MISS       |  1 +
 .../intel/SandyBridge/LONGEST_LAT_CACHE.REFERENCE  |  1 +
 .../intel/SandyBridge/MISALIGN_MEM_REF.LOADS       |  1 +
 .../intel/SandyBridge/MISALIGN_MEM_REF.STORES      |  1 +
 .../OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD       |  1 +
 .../OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD    |  1 +
 .../OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO        |  1 +
 .../SandyBridge/PARTIAL_RAT_STALLS.FLAGS_MERGE_UOP |  1 +
 .../SandyBridge/PARTIAL_RAT_STALLS.MUL_SINGLE_UOP  |  1 +
 .../SandyBridge/PARTIAL_RAT_STALLS.SLOW_LEA_WINDOW |  1 +
 .../SandyBridge/RESOURCE_STALLS2.ALL_FL_EMPTY      |  1 +
 .../SandyBridge/RESOURCE_STALLS2.ALL_PRF_CONTROL   |  1 +
 .../intel/SandyBridge/RESOURCE_STALLS2.BOB_FULL    |  1 +
 .../intel/SandyBridge/RESOURCE_STALLS2.OOO_RSRC    |  1 +
 .../intel/SandyBridge/RS_EVENTS.EMPTY_CYCLES       |  1 +
 .../intel/SandyBridge/SIMD_FP_256.PACKED_DOUBLE    |  1 +
 .../intel/SandyBridge/SIMD_FP_256.PACKED_SINGLE    |  1 +
 .../x86/events/intel/SandyBridge/UOPS_ISSUED.ANY   |  1 +
 tools/perf/arch/x86/util/pmu.c                     | 98 ++++++++++++++++++++++
 tools/perf/util/parse-events.l                     |  4 +-
 tools/perf/util/pmu.c                              | 18 ++--
 tools/perf/util/pmu.h                              |  4 +
 111 files changed, 233 insertions(+), 8 deletions(-)
author
#2 lore raw

PATCH 2/3 perf tool: Add support to include non architectural event aliases

Adding support to parse non architectural event aliases for given cpu. These aliases will be provided as 'events' directory like architectural ones provided by kernel.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/arch/x86/Makefile   |  7 +++
 tools/perf/arch/x86/util/pmu.c | 98 ++++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/pmu.c          | 18 +++++---
 tools/perf/util/pmu.h          |  4 ++
 4 files changed, 121 insertions(+), 6 deletions(-)
 create mode 100644 tools/perf/arch/x86/util/pmu.c
tools/perf/arch/x86/Makefile +7 -0
index 815841c..c175f65 100644
@@ -6,3 +6,10 @@ ifndef NO_LIBUNWIND
 LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/unwind.o
 endif
 LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/header.o
+LIB_OBJS += $(OUTPUT)arch/$(ARCH)/util/pmu.o
+
+$(OUTPUT)$(OUTPUT)arch/$(ARCH)/util/pmu.o: $(OUTPUT)arch/$(ARCH)/util/pmu.c $(OUTPUT)PERF-CFLAGS
+	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) \
+	 '-DPERF_EXEC_PATH="$(perfexecdir_SQ)"' \
+	 '-DPREFIX="$(prefix_SQ)"' \
+	 $<
tools/perf/arch/x86/util/pmu.c new file +98 -0

98 lines not on this page · raw message

tools/perf/util/pmu.c +12 -6
index 9bdc60c..626d9d7 100644
@@ -114,7 +114,7 @@ static int perf_pmu__new_alias(struct list_head *list, char *name, FILE *file)
  * Process all the sysfs attributes located under the directory
  * specified in 'dir' parameter.
  */
-static int pmu_aliases_parse(char *dir, struct list_head *head)
+int pmu_aliases_parse(char *dir, struct list_head *head)
 {
 	struct dirent *evt_ent;
 	DIR *event_dir;
@@ -146,6 +146,13 @@ static int pmu_aliases_parse(char *dir, struct list_head *head)
 	return ret;
 }
 
+__attribute__((weak))
+int arch_pmu_aliases(char *name __maybe_unused,
+		     struct list_head *head __maybe_unused)
+{
+	return 0;
+}
+
 /*
  * Reading the pmu event aliases definition, which should be located at:
  * /sys/bus/event_source/devices/<dev>/events as sysfs group attributes.
@@ -163,13 +170,12 @@ static int pmu_aliases(char *name, struct list_head *head)
 	snprintf(path, PATH_MAX,
 		 "%s/bus/event_source/devices/%s/events", sysfs, name);
 
-	if (stat(path, &st) < 0)
-		return 0;	 /* no error if 'events' does not exist */
-
-	if (pmu_aliases_parse(path, head))
+	/* no error if 'events' does not exist */
+	if (!stat(path, &st) &&
+	    pmu_aliases_parse(path, head))
 		return -1;
 
-	return 0;
+	return arch_pmu_aliases(name, head);
 }
 
 static int pmu_alias_terms(struct perf_pmu__alias *alias,
tools/perf/util/pmu.h +4 -0
index a313ed7..62da834 100644
@@ -53,5 +53,9 @@ int perf_pmu__format_parse(char *dir, struct list_head *head);
 
 struct perf_pmu *perf_pmu__scan(struct perf_pmu *pmu);
 
+int pmu_aliases_parse(char *dir, struct list_head *head);
+
+int arch_pmu_aliases(char *name, struct list_head *head);
+
 int perf_pmu__test(void);
 #endif /* __PMU_H */
Signature · 1 line
1.7.11.7
author
#1 lore raw

PATCH 1/3 perf tool: Add '.' as part of the event 'name' token

In reply to Jiri Olsa

Adding '.' to be recognized as valid part of the event 'name' token. Upcoming non architectural events use '.' as part of the name.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/util/parse-events.l | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/util/parse-events.l +2 -2
index e9d1134..15263f0 100644
@@ -80,8 +80,8 @@ event		[^,{}/]+
 num_dec		[0-9]+
 num_hex		0x[a-fA-F0-9]+
 num_raw_hex	[a-fA-F0-9]+
-name		[a-zA-Z_*?][a-zA-Z0-9_*?]*
-name_minus	[a-zA-Z_*?][a-zA-Z0-9\-_*?]*
+name		[a-zA-Z_*?][a-zA-Z0-9_*?\.]*
+name_minus	[a-zA-Z_*?][a-zA-Z0-9\-_*?\.]*
 modifier_event	[ukhpGH]+
 modifier_bp	[rwx]{1,3}
 
Signature · 1 line
1.7.11.7
author
#5 lore raw

PATCH 3/3 perf tool: Add non arch events for SandyBridge microarchitecture

In reply to Jiri Olsa

Adding non architectural event aliases for Sandy Bridge microarchitecture.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
---
 tools/perf/arch/x86/Makefile                                          | 4 ++++
 tools/perf/arch/x86/events/intel/SandyBridge/ARITH.FPU_DIV_ACT        | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.ALL_BRANCHES  | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.COND        | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.DIRECT_JMP  | 1 +
 .../arch/x86/events/intel/SandyBridge/BR_INST_EXEC.DIRECT_NEAR_CALL   | 1 +
 .../events/intel/SandyBridge/BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET   | 1 +
 .../arch/x86/events/intel/SandyBridge/BR_INST_EXEC.INDIRECT_NEAR_CALL | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.NONTAKEN    | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.RETURN_NEAR | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.TAKEN       | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.ALL_BRANCHES  | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.COND        | 1 +
 .../arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.DIRECT_NEAR_CALL   | 1 +
 .../events/intel/SandyBridge/BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET   | 1 +
 .../arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.INDIRECT_NEAR_CALL | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.NONTAKEN    | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.RETURN_NEAR | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.TAKEN       | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/CPL_CYCLES.RING0         | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/CPL_CYCLES.RING123       | 1 +
 .../x86/events/intel/SandyBridge/CPU_CLK_THREAD_UNHALTED.REF_XCLK     | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/CPU_CLK_UNHALTED.THREAD_P  | 1 +
 .../x86/events/intel/SandyBridge/DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK  | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/DTLB_LOAD_MISSES.STLB_HIT  | 1 +
 .../arch/x86/events/intel/SandyBridge/DTLB_LOAD_MISSES.WALK_COMPLETED | 1 +
 .../arch/x86/events/intel/SandyBridge/DTLB_LOAD_MISSES.WALK_DURATION  | 1 +
 .../x86/events/intel/SandyBridge/DTLB_STORE_MISSES.MISS_CAUSES_A_WALK | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/DTLB_STORE_MISSES.STLB_HIT | 1 +
 .../x86/events/intel/SandyBridge/DTLB_STORE_MISSES.WALK_COMPLETED     | 1 +
 .../arch/x86/events/intel/SandyBridge/DTLB_STORE_MISSES.WALK_DURATION | 1 +
 .../x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.SSE_FP_PACKED_DOUBLE | 1 +
 .../x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.SSE_FP_SCALAR_SINGLE | 1 +
 .../x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.SSE_PACKED_SINGLE    | 1 +
 .../x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE    | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.X87      | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/HW_PRE_REQ.DL1_MISS      | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/ICACHE.MISSES            | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/IDQ.DSB_UOPS             | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/IDQ.EMPTY                | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/IDQ.MITE_UOPS            | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/IDQ.MS_DSB_UOPS          | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/IDQ.MS_MITE_UOPS         | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/IDQ.MS_UOPS              | 1 +
 .../arch/x86/events/intel/SandyBridge/IDQ_UOPS_NOT_DELIVERED.CORE     | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/ILD_STALL.IQ_FULL        | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/ILD_STALL.LCP            | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/INSTS_WRITTEN_TO_IQ.INSTS  | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/INT_MISC.RAT_STALL_CYCLES  | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/INT_MISC.RECOVERY_CYCLES | 1 +
 .../arch/x86/events/intel/SandyBridge/ITLB_MISSES.MISS_CAUSES_A_WALK  | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/ITLB_MISSES.STLB_HIT     | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/ITLB_MISSES.WALK_COMPLETED | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/ITLB_MISSES.WALK_DURATION  | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L1D.ALLOCATED_IN_M       | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L1D.ALL_M_REPLACEMENT    | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L1D.EVICTION             | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L1D.REPLACEMENT          | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L1D_PEND_MISS.PENDING    | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.ALL      | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.HIT_E    | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.HIT_M    | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.HIT_S    | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.MISS     | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.ALL_CODE_RD     | 1 +
 .../arch/x86/events/intel/SandyBridge/L2_RQSTS.ALL_DEMAND_DATA_RD     | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.ALL_PF          | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.ALL_RFO         | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.CODE_RD_HIT     | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.CODE_RD_MISS    | 1 +
 .../arch/x86/events/intel/SandyBridge/L2_RQSTS.DEMAND_DATA_RD_HIT     | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.PF_HIT          | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.PF_MISS         | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.RFO_HITS        | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.RFO_MISS        | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_STORE_LOCK_RQSTS.ALL  | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/L2_STORE_LOCK_RQSTS.HIT_E  | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/L2_STORE_LOCK_RQSTS.HIT_M  | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/L2_STORE_LOCK_RQSTS.MISS | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS.ALL_BLOCK      | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS.DATA_UNKNOWN   | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS.NO_SR          | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS.STORE_FORWARD  | 1 +
 .../arch/x86/events/intel/SandyBridge/LD_BLOCKS_PARTIAL.ADDRESS_ALIAS | 1 +
 .../arch/x86/events/intel/SandyBridge/LD_BLOCKS_PARTIAL.ALL_STA_BLOCK | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/LOAD_HIT_PRE.HW_PF       | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/LOAD_HIT_PRE.SW_PF       | 1 +
 .../arch/x86/events/intel/SandyBridge/LOCK_CYCLES.CACHE_LOCK_DURATION | 1 +
 .../events/intel/SandyBridge/LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION  | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/LONGEST_LAT_CACHE.MISS   | 1 +
 .../arch/x86/events/intel/SandyBridge/LONGEST_LAT_CACHE.REFERENCE     | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/MISALIGN_MEM_REF.LOADS   | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/MISALIGN_MEM_REF.STORES  | 1 +
 .../events/intel/SandyBridge/OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD | 1 +
 .../intel/SandyBridge/OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD     | 1 +
 .../events/intel/SandyBridge/OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO  | 1 +
 .../x86/events/intel/SandyBridge/PARTIAL_RAT_STALLS.FLAGS_MERGE_UOP   | 1 +
 .../x86/events/intel/SandyBridge/PARTIAL_RAT_STALLS.MUL_SINGLE_UOP    | 1 +
 .../x86/events/intel/SandyBridge/PARTIAL_RAT_STALLS.SLOW_LEA_WINDOW   | 1 +
 .../arch/x86/events/intel/SandyBridge/RESOURCE_STALLS2.ALL_FL_EMPTY   | 1 +
 .../x86/events/intel/SandyBridge/RESOURCE_STALLS2.ALL_PRF_CONTROL     | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/RESOURCE_STALLS2.BOB_FULL  | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/RESOURCE_STALLS2.OOO_RSRC  | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/RS_EVENTS.EMPTY_CYCLES   | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/SIMD_FP_256.PACKED_DOUBLE  | 1 +
 .../perf/arch/x86/events/intel/SandyBridge/SIMD_FP_256.PACKED_SINGLE  | 1 +
 tools/perf/arch/x86/events/intel/SandyBridge/UOPS_ISSUED.ANY          | 1 +
 107 files changed, 110 insertions(+)
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/ARITH.FPU_DIV_ACT
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.ALL_BRANCHES
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.COND
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.DIRECT_JMP
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.DIRECT_NEAR_CALL
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.INDIRECT_NEAR_CALL
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.NONTAKEN
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.RETURN_NEAR
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.TAKEN
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.ALL_BRANCHES
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.COND
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.DIRECT_NEAR_CALL
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.INDIRECT_NEAR_CALL
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.NONTAKEN
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.RETURN_NEAR
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.TAKEN
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/CPL_CYCLES.RING0
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/CPL_CYCLES.RING123
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/CPU_CLK_THREAD_UNHALTED.REF_XCLK
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/CPU_CLK_UNHALTED.THREAD_P
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/DTLB_LOAD_MISSES.STLB_HIT
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/DTLB_LOAD_MISSES.WALK_COMPLETED
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/DTLB_LOAD_MISSES.WALK_DURATION
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/DTLB_STORE_MISSES.MISS_CAUSES_A_WALK
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/DTLB_STORE_MISSES.STLB_HIT
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/DTLB_STORE_MISSES.WALK_COMPLETED
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/DTLB_STORE_MISSES.WALK_DURATION
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.SSE_FP_PACKED_DOUBLE
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.SSE_FP_SCALAR_SINGLE
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.SSE_PACKED_SINGLE
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.X87
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/HW_PRE_REQ.DL1_MISS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/ICACHE.MISSES
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/IDQ.DSB_UOPS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/IDQ.EMPTY
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/IDQ.MITE_UOPS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/IDQ.MS_DSB_UOPS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/IDQ.MS_MITE_UOPS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/IDQ.MS_UOPS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/IDQ_UOPS_NOT_DELIVERED.CORE
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/ILD_STALL.IQ_FULL
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/ILD_STALL.LCP
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/INSTS_WRITTEN_TO_IQ.INSTS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/INT_MISC.RAT_STALL_CYCLES
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/INT_MISC.RECOVERY_CYCLES
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/ITLB_MISSES.MISS_CAUSES_A_WALK
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/ITLB_MISSES.STLB_HIT
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/ITLB_MISSES.WALK_COMPLETED
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/ITLB_MISSES.WALK_DURATION
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L1D.ALLOCATED_IN_M
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L1D.ALL_M_REPLACEMENT
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L1D.EVICTION
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L1D.REPLACEMENT
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L1D_PEND_MISS.PENDING
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.ALL
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.HIT_E
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.HIT_M
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.HIT_S
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.MISS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.ALL_CODE_RD
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.ALL_DEMAND_DATA_RD
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.ALL_PF
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.ALL_RFO
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.CODE_RD_HIT
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.CODE_RD_MISS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.DEMAND_DATA_RD_HIT
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.PF_HIT
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.PF_MISS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.RFO_HITS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.RFO_MISS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_STORE_LOCK_RQSTS.ALL
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_STORE_LOCK_RQSTS.HIT_E
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_STORE_LOCK_RQSTS.HIT_M
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/L2_STORE_LOCK_RQSTS.MISS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS.ALL_BLOCK
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS.DATA_UNKNOWN
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS.NO_SR
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS.STORE_FORWARD
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS_PARTIAL.ADDRESS_ALIAS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS_PARTIAL.ALL_STA_BLOCK
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/LOAD_HIT_PRE.HW_PF
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/LOAD_HIT_PRE.SW_PF
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/LOCK_CYCLES.CACHE_LOCK_DURATION
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/LONGEST_LAT_CACHE.MISS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/LONGEST_LAT_CACHE.REFERENCE
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/MISALIGN_MEM_REF.LOADS
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/MISALIGN_MEM_REF.STORES
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/PARTIAL_RAT_STALLS.FLAGS_MERGE_UOP
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/PARTIAL_RAT_STALLS.MUL_SINGLE_UOP
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/PARTIAL_RAT_STALLS.SLOW_LEA_WINDOW
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/RESOURCE_STALLS2.ALL_FL_EMPTY
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/RESOURCE_STALLS2.ALL_PRF_CONTROL
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/RESOURCE_STALLS2.BOB_FULL
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/RESOURCE_STALLS2.OOO_RSRC
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/RS_EVENTS.EMPTY_CYCLES
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/SIMD_FP_256.PACKED_DOUBLE
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/SIMD_FP_256.PACKED_SINGLE
 create mode 100644 tools/perf/arch/x86/events/intel/SandyBridge/UOPS_ISSUED.ANY
tools/perf/arch/x86/Makefile +4 -0
index c175f65..5aa5e06 100644
@@ -13,3 +13,7 @@ $(OUTPUT)$(OUTPUT)arch/$(ARCH)/util/pmu.o: $(OUTPUT)arch/$(ARCH)/util/pmu.c $(OU
 	 '-DPERF_EXEC_PATH="$(perfexecdir_SQ)"' \
 	 '-DPREFIX="$(prefix_SQ)"' \
 	 $<
+
+install:
+	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/events/x86/intel/SandyBridge'
+	$(INSTALL) -m 644 arch/$(ARCH)/events/intel/SandyBridge/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/events/x86/intel/SandyBridge/'
tools/perf/arch/x86/events/intel/SandyBridge/ARITH.FPU_DIV_ACT new file +1 -0
new file mode 100644
index 0000000..848c5cc
@@ -0,0 +1 @@
+event=0x14,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.ALL_BRANCHES new file +1 -0
new file mode 100644
index 0000000..d4c8594
@@ -0,0 +1 @@
+event=0x88,umask=0xff
tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.COND new file +1 -0
new file mode 100644
index 0000000..be6ab16
@@ -0,0 +1 @@
+event=0x88,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.DIRECT_JMP new file +1 -0
new file mode 100644
index 0000000..d9896ac
@@ -0,0 +1 @@
+event=0x88,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.DIRECT_NEAR_CALL new file +1 -0
new file mode 100644
index 0000000..5a14f1e
@@ -0,0 +1 @@
+event=0x88,umask=0x10
tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET new file +1 -0
new file mode 100644
index 0000000..61b209f
@@ -0,0 +1 @@
+event=0x88,umask=0x4
tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.INDIRECT_NEAR_CALL new file +1 -0
new file mode 100644
index 0000000..a9a05a0
@@ -0,0 +1 @@
+event=0x88,umask=0x20
tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.NONTAKEN new file +1 -0
new file mode 100644
index 0000000..7042e0c
@@ -0,0 +1 @@
+event=0x88,umask=0x40
tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.RETURN_NEAR new file +1 -0
new file mode 100644
index 0000000..31b35ac
@@ -0,0 +1 @@
+event=0x88,umask=0x8
tools/perf/arch/x86/events/intel/SandyBridge/BR_INST_EXEC.TAKEN new file +1 -0
new file mode 100644
index 0000000..d9aca88
@@ -0,0 +1 @@
+event=0x88,umask=0x80
tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.ALL_BRANCHES new file +1 -0
new file mode 100644
index 0000000..a65240f
@@ -0,0 +1 @@
+event=0x89,umask=0xff
tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.COND new file +1 -0
new file mode 100644
index 0000000..47f455b
@@ -0,0 +1 @@
+event=0x89,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.DIRECT_NEAR_CALL new file +1 -0
new file mode 100644
index 0000000..f74bd8e
@@ -0,0 +1 @@
+event=0x89,umask=0x10
tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET new file +1 -0
new file mode 100644
index 0000000..e3caba5
@@ -0,0 +1 @@
+event=0x89,umask=0x4
tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.INDIRECT_NEAR_CALL new file +1 -0
new file mode 100644
index 0000000..530436c
@@ -0,0 +1 @@
+event=0x89,umask=0x20
tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.NONTAKEN new file +1 -0
new file mode 100644
index 0000000..d074871
@@ -0,0 +1 @@
+event=0x89,umask=0x40
tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.RETURN_NEAR new file +1 -0
new file mode 100644
index 0000000..8791133
@@ -0,0 +1 @@
+event=0x89,umask=0x8
tools/perf/arch/x86/events/intel/SandyBridge/BR_MISP_EXEC.TAKEN new file +1 -0
new file mode 100644
index 0000000..b99bd46
@@ -0,0 +1 @@
+event=0x89,umask=0x80
tools/perf/arch/x86/events/intel/SandyBridge/CPL_CYCLES.RING0 new file +1 -0
new file mode 100644
index 0000000..8103f9c
@@ -0,0 +1 @@
+event=0x5c,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/CPL_CYCLES.RING123 new file +1 -0
new file mode 100644
index 0000000..c08f3f1
@@ -0,0 +1 @@
+event=0x5c,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/CPU_CLK_THREAD_UNHALTED.REF_XCLK new file +1 -0
new file mode 100644
index 0000000..5e9a032
@@ -0,0 +1 @@
+event=0x3c,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/CPU_CLK_UNHALTED.THREAD_P new file +1 -0
new file mode 100644
index 0000000..41f221b
@@ -0,0 +1 @@
+event=0x3c,umask=0x0
tools/perf/arch/x86/events/intel/SandyBridge/DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK new file +1 -0
new file mode 100644
index 0000000..4c49a79
@@ -0,0 +1 @@
+event=0x8,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/DTLB_LOAD_MISSES.STLB_HIT new file +1 -0
new file mode 100644
index 0000000..a0ef5aa
@@ -0,0 +1 @@
+event=0x8,umask=0x10
tools/perf/arch/x86/events/intel/SandyBridge/DTLB_LOAD_MISSES.WALK_COMPLETED new file +1 -0
new file mode 100644
index 0000000..78c3024
@@ -0,0 +1 @@
+event=0x8,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/DTLB_LOAD_MISSES.WALK_DURATION new file +1 -0
new file mode 100644
index 0000000..bfcf2a4
@@ -0,0 +1 @@
+event=0x8,umask=0x4
tools/perf/arch/x86/events/intel/SandyBridge/DTLB_STORE_MISSES.MISS_CAUSES_A_WALK new file +1 -0
new file mode 100644
index 0000000..2517178
@@ -0,0 +1 @@
+event=0x49,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/DTLB_STORE_MISSES.STLB_HIT new file +1 -0
new file mode 100644
index 0000000..669b234
@@ -0,0 +1 @@
+event=0x49,umask=0x10
tools/perf/arch/x86/events/intel/SandyBridge/DTLB_STORE_MISSES.WALK_COMPLETED new file +1 -0
new file mode 100644
index 0000000..3014650
@@ -0,0 +1 @@
+event=0x49,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/DTLB_STORE_MISSES.WALK_DURATION new file +1 -0
new file mode 100644
index 0000000..4fe198a
@@ -0,0 +1 @@
+event=0x49,umask=0x4
tools/perf/arch/x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.SSE_FP_PACKED_DOUBLE new file +1 -0
new file mode 100644
index 0000000..dd34532
@@ -0,0 +1 @@
+event=0x10,umask=0x10
tools/perf/arch/x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.SSE_FP_SCALAR_SINGLE new file +1 -0
new file mode 100644
index 0000000..55f6c39
@@ -0,0 +1 @@
+event=0x10,umask=0x20
tools/perf/arch/x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.SSE_PACKED_SINGLE new file +1 -0
new file mode 100644
index 0000000..5336605
@@ -0,0 +1 @@
+event=0x10,umask=0x40
tools/perf/arch/x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE new file +1 -0
new file mode 100644
index 0000000..ea05109e
@@ -0,0 +1 @@
+event=0x10,umask=0x80
tools/perf/arch/x86/events/intel/SandyBridge/FP_COMP_OPS_EXE.X87 new file +1 -0
new file mode 100644
index 0000000..e8fbc879
@@ -0,0 +1 @@
+event=0x10,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/HW_PRE_REQ.DL1_MISS new file +1 -0
new file mode 100644
index 0000000..87ae6c5
@@ -0,0 +1 @@
+event=0x4e,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/ICACHE.MISSES new file +1 -0
new file mode 100644
index 0000000..952b3b5
@@ -0,0 +1 @@
+event=0x80,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/IDQ.DSB_UOPS new file +1 -0
new file mode 100644
index 0000000..5f7f9e4
@@ -0,0 +1 @@
+event=0x79,umask=0x8
tools/perf/arch/x86/events/intel/SandyBridge/IDQ.EMPTY new file +1 -0
new file mode 100644
index 0000000..bf02969
@@ -0,0 +1 @@
+event=0x79,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/IDQ.MITE_UOPS new file +1 -0
new file mode 100644
index 0000000..eff6d32
@@ -0,0 +1 @@
+event=0x79,umask=0x4
tools/perf/arch/x86/events/intel/SandyBridge/IDQ.MS_DSB_UOPS new file +1 -0
new file mode 100644
index 0000000..a6a688f
@@ -0,0 +1 @@
+event=0x79,umask=0x10
tools/perf/arch/x86/events/intel/SandyBridge/IDQ.MS_MITE_UOPS new file +1 -0
new file mode 100644
index 0000000..e6883aa
@@ -0,0 +1 @@
+event=0x79,umask=0x20
tools/perf/arch/x86/events/intel/SandyBridge/IDQ.MS_UOPS new file +1 -0
new file mode 100644
index 0000000..684f0cd
@@ -0,0 +1 @@
+event=0x79,umask=0x30
tools/perf/arch/x86/events/intel/SandyBridge/IDQ_UOPS_NOT_DELIVERED.CORE new file +1 -0
new file mode 100644
index 0000000..f6ba68a
@@ -0,0 +1 @@
+event=0x9c,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/ILD_STALL.IQ_FULL new file +1 -0
new file mode 100644
index 0000000..93863b6
@@ -0,0 +1 @@
+event=0x87,umask=0x4
tools/perf/arch/x86/events/intel/SandyBridge/ILD_STALL.LCP new file +1 -0
new file mode 100644
index 0000000..ef6784d
@@ -0,0 +1 @@
+event=0x87,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/INSTS_WRITTEN_TO_IQ.INSTS new file +1 -0
new file mode 100644
index 0000000..792774c
@@ -0,0 +1 @@
+event=0x17,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/INT_MISC.RAT_STALL_CYCLES new file +1 -0
new file mode 100644
index 0000000..dd26cf7
@@ -0,0 +1 @@
+event=0xd,umask=0x40
tools/perf/arch/x86/events/intel/SandyBridge/INT_MISC.RECOVERY_CYCLES new file +1 -0
new file mode 100644
index 0000000..ce54bb4
@@ -0,0 +1 @@
+event=0xd,umask=0x3
tools/perf/arch/x86/events/intel/SandyBridge/ITLB_MISSES.MISS_CAUSES_A_WALK new file +1 -0
new file mode 100644
index 0000000..66e49cb
@@ -0,0 +1 @@
+event=0x85,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/ITLB_MISSES.STLB_HIT new file +1 -0
new file mode 100644
index 0000000..7b2d808
@@ -0,0 +1 @@
+event=0x85,umask=0x10
tools/perf/arch/x86/events/intel/SandyBridge/ITLB_MISSES.WALK_COMPLETED new file +1 -0
new file mode 100644
index 0000000..4de9121
@@ -0,0 +1 @@
+event=0x85,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/ITLB_MISSES.WALK_DURATION new file +1 -0
new file mode 100644
index 0000000..81fd533
@@ -0,0 +1 @@
+event=0x85,umask=0x4
tools/perf/arch/x86/events/intel/SandyBridge/L1D.ALLOCATED_IN_M new file +1 -0
new file mode 100644
index 0000000..673bbf2
@@ -0,0 +1 @@
+event=0x51,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/L1D.ALL_M_REPLACEMENT new file +1 -0
new file mode 100644
index 0000000..a229d2a
@@ -0,0 +1 @@
+event=0x51,umask=0x8
tools/perf/arch/x86/events/intel/SandyBridge/L1D.EVICTION new file +1 -0
new file mode 100644
index 0000000..c81af2b
@@ -0,0 +1 @@
+event=0x51,umask=0x4
tools/perf/arch/x86/events/intel/SandyBridge/L1D.REPLACEMENT new file +1 -0
new file mode 100644
index 0000000..98df40c
@@ -0,0 +1 @@
+event=0x51,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/L1D_PEND_MISS.PENDING new file +1 -0
new file mode 100644
index 0000000..ee415b7
@@ -0,0 +1 @@
+event=0x48,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.ALL new file +1 -0
new file mode 100644
index 0000000..d78d6b3
@@ -0,0 +1 @@
+event=0x28,umask=0xf
tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.HIT_E new file +1 -0
new file mode 100644
index 0000000..5e16e34
@@ -0,0 +1 @@
+event=0x28,umask=0x4
tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.HIT_M new file +1 -0
new file mode 100644
index 0000000..5a2669f
@@ -0,0 +1 @@
+event=0x28,umask=0x8
tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.HIT_S new file +1 -0
new file mode 100644
index 0000000..7b1f305
@@ -0,0 +1 @@
+event=0x28,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/L2_L1D_WB_RQSTS.MISS new file +1 -0
new file mode 100644
index 0000000..f3d15b2
@@ -0,0 +1 @@
+event=0x28,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.ALL_CODE_RD new file +1 -0
new file mode 100644
index 0000000..9774607
@@ -0,0 +1 @@
+event=0x24,umask=0x30
tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.ALL_DEMAND_DATA_RD new file +1 -0
new file mode 100644
index 0000000..8ecaf00
@@ -0,0 +1 @@
+event=0x24,umask=0x3
tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.ALL_PF new file +1 -0
new file mode 100644
index 0000000..e8c9bc1
@@ -0,0 +1 @@
+event=0x24,umask=0xc0
tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.ALL_RFO new file +1 -0
new file mode 100644
index 0000000..fc683ae
@@ -0,0 +1 @@
+event=0x24,umask=0xc
tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.CODE_RD_HIT new file +1 -0
new file mode 100644
index 0000000..706e256
@@ -0,0 +1 @@
+event=0x24,umask=0x10
tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.CODE_RD_MISS new file +1 -0
new file mode 100644
index 0000000..0de0208
@@ -0,0 +1 @@
+event=0x24,umask=0x20
tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.DEMAND_DATA_RD_HIT new file +1 -0
new file mode 100644
index 0000000..048c358
@@ -0,0 +1 @@
+event=0x24,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.PF_HIT new file +1 -0
new file mode 100644
index 0000000..dc9b072
@@ -0,0 +1 @@
+event=0x24,umask=0x40
tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.PF_MISS new file +1 -0
new file mode 100644
index 0000000..42699ad
@@ -0,0 +1 @@
+event=0x24,umask=0x80
tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.RFO_HITS new file +1 -0
new file mode 100644
index 0000000..501325c
@@ -0,0 +1 @@
+event=0x24,umask=0x4
tools/perf/arch/x86/events/intel/SandyBridge/L2_RQSTS.RFO_MISS new file +1 -0
new file mode 100644
index 0000000..db9ae2d
@@ -0,0 +1 @@
+event=0x24,umask=0x8
tools/perf/arch/x86/events/intel/SandyBridge/L2_STORE_LOCK_RQSTS.ALL new file +1 -0
new file mode 100644
index 0000000..8268b73
@@ -0,0 +1 @@
+event=0x27,umask=0xf
tools/perf/arch/x86/events/intel/SandyBridge/L2_STORE_LOCK_RQSTS.HIT_E new file +1 -0
new file mode 100644
index 0000000..aaa3478
@@ -0,0 +1 @@
+event=0x27,umask=0x4
tools/perf/arch/x86/events/intel/SandyBridge/L2_STORE_LOCK_RQSTS.HIT_M new file +1 -0
new file mode 100644
index 0000000..922f0f6
@@ -0,0 +1 @@
+event=0x27,umask=0x8
tools/perf/arch/x86/events/intel/SandyBridge/L2_STORE_LOCK_RQSTS.MISS new file +1 -0
new file mode 100644
index 0000000..173251f
@@ -0,0 +1 @@
+event=0x27,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS.ALL_BLOCK new file +1 -0
new file mode 100644
index 0000000..4fd03d9
@@ -0,0 +1 @@
+event=0x3,umask=0x10
tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS.DATA_UNKNOWN new file +1 -0
new file mode 100644
index 0000000..db0f3a0
@@ -0,0 +1 @@
+event=0x3,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS.NO_SR new file +1 -0
new file mode 100644
index 0000000..c5c5263
@@ -0,0 +1 @@
+event=0x3,umask=0x8
tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS.STORE_FORWARD new file +1 -0
new file mode 100644
index 0000000..290a930
@@ -0,0 +1 @@
+event=0x3,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS_PARTIAL.ADDRESS_ALIAS new file +1 -0
new file mode 100644
index 0000000..585a9d3
@@ -0,0 +1 @@
+event=0x7,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/LD_BLOCKS_PARTIAL.ALL_STA_BLOCK new file +1 -0
new file mode 100644
index 0000000..b6e3a04
@@ -0,0 +1 @@
+event=0x7,umask=0x8
tools/perf/arch/x86/events/intel/SandyBridge/LOAD_HIT_PRE.HW_PF new file +1 -0
new file mode 100644
index 0000000..4699d32
@@ -0,0 +1 @@
+event=0x4c,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/LOAD_HIT_PRE.SW_PF new file +1 -0
new file mode 100644
index 0000000..cd59610
@@ -0,0 +1 @@
+event=0x4c,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/LOCK_CYCLES.CACHE_LOCK_DURATION new file +1 -0
new file mode 100644
index 0000000..888f06f
@@ -0,0 +1 @@
+event=0x63,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION new file +1 -0
new file mode 100644
index 0000000..9ee63d0
@@ -0,0 +1 @@
+event=0x63,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/LONGEST_LAT_CACHE.MISS new file +1 -0
new file mode 100644
index 0000000..02a011f
@@ -0,0 +1 @@
+event=0x2e,umask=0x41
tools/perf/arch/x86/events/intel/SandyBridge/LONGEST_LAT_CACHE.REFERENCE new file +1 -0
new file mode 100644
index 0000000..d7d2ae9
@@ -0,0 +1 @@
+event=0x2e,umask=0x4f
tools/perf/arch/x86/events/intel/SandyBridge/MISALIGN_MEM_REF.LOADS new file +1 -0
new file mode 100644
index 0000000..efcfc2b
@@ -0,0 +1 @@
+event=0x5,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/MISALIGN_MEM_REF.STORES new file +1 -0
new file mode 100644
index 0000000..26d77f4
@@ -0,0 +1 @@
+event=0x5,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD new file +1 -0
new file mode 100644
index 0000000..1149577
@@ -0,0 +1 @@
+event=0x60,umask=0x8
tools/perf/arch/x86/events/intel/SandyBridge/OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD new file +1 -0
new file mode 100644
index 0000000..54c256b
@@ -0,0 +1 @@
+event=0x60,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO new file +1 -0
new file mode 100644
index 0000000..24fc7b3
@@ -0,0 +1 @@
+event=0x60,umask=0x4
tools/perf/arch/x86/events/intel/SandyBridge/PARTIAL_RAT_STALLS.FLAGS_MERGE_UOP new file +1 -0
new file mode 100644
index 0000000..27ba1d8
@@ -0,0 +1 @@
+event=0x59,umask=0x20
tools/perf/arch/x86/events/intel/SandyBridge/PARTIAL_RAT_STALLS.MUL_SINGLE_UOP new file +1 -0
new file mode 100644
index 0000000..397928e
@@ -0,0 +1 @@
+event=0x59,umask=0x80
tools/perf/arch/x86/events/intel/SandyBridge/PARTIAL_RAT_STALLS.SLOW_LEA_WINDOW new file +1 -0
new file mode 100644
index 0000000..f14229c
@@ -0,0 +1 @@
+event=0x59,umask=0x40
tools/perf/arch/x86/events/intel/SandyBridge/RESOURCE_STALLS2.ALL_FL_EMPTY new file +1 -0
new file mode 100644
index 0000000..597be5a
@@ -0,0 +1 @@
+event=0x5b,umask=0xc
tools/perf/arch/x86/events/intel/SandyBridge/RESOURCE_STALLS2.ALL_PRF_CONTROL new file +1 -0
new file mode 100644
index 0000000..6f86552
@@ -0,0 +1 @@
+event=0x5b,umask=0xf
tools/perf/arch/x86/events/intel/SandyBridge/RESOURCE_STALLS2.BOB_FULL new file +1 -0
new file mode 100644
index 0000000..f16a284
@@ -0,0 +1 @@
+event=0x5b,umask=0x40
tools/perf/arch/x86/events/intel/SandyBridge/RESOURCE_STALLS2.OOO_RSRC new file +1 -0
new file mode 100644
index 0000000..d6882a1
@@ -0,0 +1 @@
+event=0x5b,umask=0x4f
tools/perf/arch/x86/events/intel/SandyBridge/RS_EVENTS.EMPTY_CYCLES new file +1 -0
new file mode 100644
index 0000000..b7d43d3
@@ -0,0 +1 @@
+event=0x5e,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/SIMD_FP_256.PACKED_DOUBLE new file +1 -0
new file mode 100644
index 0000000..9e9b2c2
@@ -0,0 +1 @@
+event=0x11,umask=0x2
tools/perf/arch/x86/events/intel/SandyBridge/SIMD_FP_256.PACKED_SINGLE new file +1 -0
new file mode 100644
index 0000000..233110e
@@ -0,0 +1 @@
+event=0x11,umask=0x1
tools/perf/arch/x86/events/intel/SandyBridge/UOPS_ISSUED.ANY new file +1 -0
new file mode 100644
index 0000000..ea46967
@@ -0,0 +1 @@
+event=0xe,umask=0x1
Signature · 1 line
1.7.11.7
maintainer
#3 lore raw

Re: [PATCH 2/3] perf tool: Add support to include non architectural event aliases

In reply to Jiri Olsa

Hi Jiri,

Quoted 4 lines · Jiri Olsa

Adding support to parse non architectural event aliases for given cpu. These aliases will be provided as 'events' directory like architectural ones provided by kernel.

[snip]

Quoted 2 lines

+
+$(OUTPUT)$(OUTPUT)arch/$(ARCH)/util/pmu.o: $(OUTPUT)arch/$(ARCH)/util/pmu.c $(OUTPUT)PERF-CFLAGS

Double OUTPUT ? ;)

Quoted 4 lines
tools/perf/arch/x86/Makefile +4 -0
+	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) \
+	 '-DPERF_EXEC_PATH="$(perfexecdir_SQ)"' \
+	 '-DPREFIX="$(prefix_SQ)"' \
+	 $<

[snip]

tools/perf/arch/x86/util/pmu.c line 71

Quoted 3 lines
tools/perf/arch/x86/util/pmu.c new file +3 -0
+static int cpu_aliases(struct list_head *head)
+{
+	unsigned vendol, model;

s/vendol/vendor/ ?

Thanks,
Namhyung

Quoted 19 lines
tools/perf/arch/x86/util/pmu.c new file +19 -0
+	int ret;
+
+	ret = cpu_specs(&vendol, &model);
+	if (ret) {
+		pr_info("failed to get cpu aliases");
+		return 0;
+	}
+
+	switch (vendol) {
+	/* Intel */
+	case 0:
+		return intel_aliases(head, model);
+	default:
+		/* unknown vendor.. plenty to cover ;-) */
+		return 0;
+	}
+
+	return 0;
+}
author
#4 lore raw

Re: [PATCH 2/3] perf tool: Add support to include non architectural event aliases

Quoted 7 lines · Namhyung Kim

Hi Jiri,

Quoted 4 lines · Jiri Olsa

Adding support to parse non architectural event aliases for given cpu. These aliases will be provided as 'events' directory like architectural ones provided by kernel.

Quoted 5 lines

[snip]

Quoted 2 lines

+
+$(OUTPUT)$(OUTPUT)arch/$(ARCH)/util/pmu.o: $(OUTPUT)arch/$(ARCH)/util/pmu.c $(OUTPUT)PERF-CFLAGS

Double OUTPUT ? ;)

humm, yes ;-)

Quoted 7 lines
Quoted 6 lines
tools/perf/arch/x86/Makefile +4 -0
+	$(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) \
+	 '-DPERF_EXEC_PATH="$(perfexecdir_SQ)"' \
+	 '-DPREFIX="$(prefix_SQ)"' \
+	 $<

[snip]

Quoted 5 lines

tools/perf/arch/x86/util/pmu.c line 71

Quoted 3 lines
tools/perf/arch/x86/util/pmu.c new file +3 -0
+static int cpu_aliases(struct list_head *head)
+{
+	unsigned vendol, model;

s/vendol/vendor/ ?

http://en.wikipedia.org/wiki/The_13th_Warrior
... 'Wendol', fiends who come with the mist to kill and eat human flesh ...

;-)

thanks
jirka

#6 lore raw

Re: [PATCH 3/3] perf tool: Add non arch events for SandyBridge microarchitecture

In reply to Jiri Olsa
Quoted 2 lines · Jiri Olsa

Adding non architectural event aliases for Sandy Bridge microarchitecture.

"SandyBridge" is not necessarily unique. There are flavours of sandy bridge with slightly different events (e.g. in offcore) Also there's uncores too, which are very different between different SandyBridges.

I would merge all these little files into a single file. I don't think anyone wants hundreds of new files for this, if you do it for multiple CPUs.

Besides it would waste insane amounts of space on most file systems without tail packing -- each of your little files takes 4K plus an inode and directory entry.

Intel normally uses a spreadsheet CSV format.

Best would be probably to just teach perf about reading one of those standard formats, then they could be just downloaded somewhere. I have some python scripts that do it as a wrapper.

-Andi

Signature · 1 line
[email protected] -- Speaking for myself only
author
#7 lore raw

Re: [PATCH 3/3] perf tool: Add non arch events for SandyBridge microarchitecture

Quoted 5 lines · Andi Kleen
Quoted 2 lines · Jiri Olsa

Adding non architectural event aliases for Sandy Bridge microarchitecture.

Quoted 8 lines

"SandyBridge" is not necessarily unique. There are flavours of sandy bridge with slightly different events (e.g. in offcore) Also there's uncores too, which are very different between different SandyBridges.

I would merge all these little files into a single file. I don't think anyone wants hundreds of new files for this, if you do it for multiple CPUs.

right, that's better

Quoted 6 lines

Besides it would waste insane amounts of space on most file systems without tail packing -- each of your little files takes 4K plus an inode and directory entry.

Intel normally uses a spreadsheet CSV format.

Is there anything in public I could download and check?

Quoted 3 lines

Best would be probably to just teach perf about reading one of those standard formats, then they could be just downloaded somewhere.

so, when you say standard format.. CSV? like:

BR_MISP_EXEC.ALL_BRANCHES,event=0x89,umask=0xff BR_MISP_EXEC.COND,event=0x89,umask=0x1 BR_MISP_EXEC.DIRECT_NEAR_CALL,event=0x89,umask=0x10 BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET,event=0x89,umask=0x4 BR_MISP_EXEC.INDIRECT_NEAR_CALL,event=0x89,umask=0x20 BR_MISP_EXEC.NONTAKEN,event=0x89,umask=0x40 BR_MISP_EXEC.RETURN_NEAR,event=0x89,umask=0x8 BR_MISP_EXEC.TAKEN,event=0x89,umask=0x80

would be no big change for alias loader

thanks,
jirka

#8 lore raw

Re: [PATCH 3/3] perf tool: Add non arch events for SandyBridge microarchitecture

Quoted 9 lines · Jiri Olsa

BR_MISP_EXEC.ALL_BRANCHES,event=0x89,umask=0xff BR_MISP_EXEC.COND,event=0x89,umask=0x1 BR_MISP_EXEC.DIRECT_NEAR_CALL,event=0x89,umask=0x10 BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET,event=0x89,umask=0x4 BR_MISP_EXEC.INDIRECT_NEAR_CALL,event=0x89,umask=0x20 BR_MISP_EXEC.NONTAKEN,event=0x89,umask=0x40 BR_MISP_EXEC.RETURN_NEAR,event=0x89,umask=0x8 BR_MISP_EXEC.TAKEN,event=0x89,umask=0x80

I hate to sound like a broken record here, but, again, what's the rationalization for not using libpfm4 here?

Is it simply NIH or is there some sort of technical reason? It seems a lot of wasted effort to create all these tables one chip at a time when libpfm4 already has well-tested and debugged event tables for most CPUs with perf_event support.

Vince

#9 lore raw

Re: [PATCH 3/3] perf tool: Add non arch events for SandyBridge microarchitecture

Quoted 2 lines

I hate to sound like a broken record here, but, again, what's the rationalization for not using libpfm4 here?

Personally I always hated the libpfm4 syntax. It's even worse than oprofile.

Quoted 5 lines

Is it simply NIH or is there some sort of technical reason? It seems a lot of wasted effort to create all these tables one chip at a time when libpfm4 already has well-tested and debugged event tables for most CPUs with perf_event support.

I'm probably biased, but it's usually best to use the format the CPU vendor releases the original event tables in. That gives you the fastest access with the minimum amount of hazzle.

That would need a parser for each vendor, but there aren't really all that many.

-Andi

Signature · 1 line
[email protected] -- Speaking for myself only.
#10 lore raw

Re: [PATCH 3/3] perf tool: Add non arch events for SandyBridge microarchitecture

Quoted 5 lines · Andi Kleen
Quoted 2 lines

I hate to sound like a broken record here, but, again, what's the rationalization for not using libpfm4 here?

Personally I always hated the libpfm4 syntax. It's even worse than oprofile.

how so? The libpfm4 event names are more or less the same as that from the manuals with the exception that . is replaced with : in some cases.

Quoted 3 lines

I'm probably biased, but it's usually best to use the format the CPU vendor releases the original event tables in. That gives you the fastest access with the minimum amount of hazzle.

Which vendors provide "original tables"? None as far as I know, you are stuck digging through PDFs.

Unless you mean the tables that come with Vtune... are those licensed in a way that is useful?

libpfm4 also provides at least minimal event descriptions along with each event, will the kernel/perf provide those too?

Vince