Skip to content

Commit e86f5e9

Browse files
committed
add branch mispredict ratio
1 parent 0c159b5 commit e86f5e9

File tree

16 files changed

+72
-0
lines changed

16 files changed

+72
-0
lines changed

cmd/metrics/resources/events/x86_64/GenuineIntel/emr.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ cpu-cycles,
5252
ref-cycles,
5353
instructions;
5454

55+
cpu/event=0xc4,umask=0x00,period=100003,name='BR_INST_RETIRED.ALL_BRANCHES'/,
56+
cpu/event=0xc5,umask=0x00,period=100003,name='BR_MISP_RETIRED.ALL_BRANCHES'/,
5557
cpu/event=0xcf,umask=0x10,cmask=0x00,period=100003,name='FP_ARITH_INST_RETIRED2.512B_PACKED_HALF'/,
5658
cpu/event=0xcf,umask=0x08,cmask=0x00,period=100003,name='FP_ARITH_INST_RETIRED2.256B_PACKED_HALF'/,
5759
cpu/event=0xc7,umask=0x80,cmask=0x00,period=100003,name='FP_ARITH_INST_RETIRED.512B_PACKED_SINGLE'/,

cmd/metrics/resources/events/x86_64/GenuineIntel/emr_nofixedtma.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ cpu/event=0x51,umask=0x01,period=100003,name='L1D.REPLACEMENT'/,
77
cpu/event=0x24,umask=0xe4,period=200003,name='L2_RQSTS.ALL_CODE_RD'/,
88
cpu/event=0xd1,umask=0x01,period=1000003,name='MEM_LOAD_RETIRED.L1_HIT'/,
99
cpu/event=0x25,umask=0x1f,period=100003,name='L2_LINES_IN.ALL'/,
10+
cpu/event=0xc4,umask=0x00,period=100003,name='BR_INST_RETIRED.ALL_BRANCHES'/,
11+
cpu/event=0xc5,umask=0x00,period=100003,name='BR_MISP_RETIRED.ALL_BRANCHES'/,
1012
cpu-cycles,
1113
ref-cycles,
1214
instructions;

cmd/metrics/resources/events/x86_64/GenuineIntel/gnr.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ cpu-cycles,
2323
ref-cycles,
2424
instructions;
2525

26+
cpu/event=0xc4,umask=0x00,period=100003,name='BR_INST_RETIRED.ALL_BRANCHES'/,
27+
cpu/event=0xc5,umask=0x00,period=100003,name='BR_MISP_RETIRED.ALL_BRANCHES'/,
2628
cpu/event=0x12,umask=0x0e,period=100003,name='DTLB_LOAD_MISSES.WALK_COMPLETED'/,
2729
cpu/event=0x12,umask=0x04,period=100003,name='DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M'/,
2830
cpu/event=0x13,umask=0x0e,period=100003,name='DTLB_STORE_MISSES.WALK_COMPLETED'/,

cmd/metrics/resources/events/x86_64/GenuineIntel/icx.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ cpu-cycles,
1212
ref-cycles,
1313
instructions;
1414

15+
cpu/event=0xc4,umask=0x00,period=100003,name='BR_INST_RETIRED.ALL_BRANCHES'/,
16+
cpu/event=0xc5,umask=0x00,period=100003,name='BR_MISP_RETIRED.ALL_BRANCHES'/,
1517
cpu/event=0xf1,umask=0x1f,period=100003,name='L2_LINES_IN.ALL'/,
1618
cpu/event=0xd1,umask=0x10,period=100021,name='MEM_LOAD_RETIRED.L2_MISS'/,
1719
cpu-cycles,

cmd/metrics/resources/events/x86_64/GenuineIntel/icx_nofixedtma.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ cpu-cycles,
1313
ref-cycles,
1414
instructions;
1515

16+
cpu/event=0xc4,umask=0x00,period=100003,name='BR_INST_RETIRED.ALL_BRANCHES'/,
17+
cpu/event=0xc5,umask=0x00,period=100003,name='BR_MISP_RETIRED.ALL_BRANCHES'/,
1618
cpu/event=0xd1,umask=0x10,period=100021,name='MEM_LOAD_RETIRED.L2_MISS'/,
1719
cpu/event=0x79,umask=0x08,cmask=0x00,period=2000003,name='IDQ.DSB_UOPS'/,
1820
cpu/event=0xa8,umask=0x01,cmask=0x00,period=2000003,name='LSD.UOPS'/,

cmd/metrics/resources/events/x86_64/GenuineIntel/spr.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ cpu-cycles,
5252
ref-cycles,
5353
instructions;
5454

55+
cpu/event=0xc4,umask=0x00,period=100003,name='BR_INST_RETIRED.ALL_BRANCHES'/,
56+
cpu/event=0xc5,umask=0x00,period=100003,name='BR_MISP_RETIRED.ALL_BRANCHES'/,
5557
cpu/event=0xcf,umask=0x10,cmask=0x00,period=100003,name='FP_ARITH_INST_RETIRED2.512B_PACKED_HALF'/,
5658
cpu/event=0xcf,umask=0x08,cmask=0x00,period=100003,name='FP_ARITH_INST_RETIRED2.256B_PACKED_HALF'/,
5759
cpu/event=0xc7,umask=0x80,cmask=0x00,period=100003,name='FP_ARITH_INST_RETIRED.512B_PACKED_SINGLE'/,

cmd/metrics/resources/events/x86_64/GenuineIntel/spr_nofixedtma.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ cpu/event=0x51,umask=0x01,period=100003,name='L1D.REPLACEMENT'/,
77
cpu/event=0x24,umask=0xe4,period=200003,name='L2_RQSTS.ALL_CODE_RD'/,
88
cpu/event=0xd1,umask=0x01,period=1000003,name='MEM_LOAD_RETIRED.L1_HIT'/,
99
cpu/event=0x25,umask=0x1f,period=100003,name='L2_LINES_IN.ALL'/,
10+
cpu/event=0xc4,umask=0x00,period=100003,name='BR_INST_RETIRED.ALL_BRANCHES'/,
11+
cpu/event=0xc5,umask=0x00,period=100003,name='BR_MISP_RETIRED.ALL_BRANCHES'/,
1012
cpu-cycles,
1113
ref-cycles,
1214
instructions;

cmd/metrics/resources/events/x86_64/GenuineIntel/srf.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# SierraForest event list
22

3+
cpu/event=0xc4,umask=0x00,period=100003,name='BR_INST_RETIRED.ALL_BRANCHES'/,
4+
cpu/event=0xc5,umask=0x00,period=100003,name='BR_MISP_RETIRED.ALL_BRANCHES'/,
35
cpu-cycles:k,
46
ref-cycles:k,
57
instructions:k;

cmd/metrics/resources/metrics/x86_64/GenuineIntel/emr.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@
3737
"expression": "[instructions] / 1000000000",
3838
"origin": "perfspect"
3939
},
40+
{
41+
"name": "metric_branch misprediction ratio",
42+
"name-txn": "metric_branch mispredictions per txn",
43+
"expression": "[BR_MISP_RETIRED.ALL_BRANCHES] / [BR_INST_RETIRED.ALL_BRANCHES]",
44+
"expression-txn": "[BR_MISP_RETIRED.ALL_BRANCHES] / [TXN]",
45+
"origin": "perfspect"
46+
},
4047
{
4148
"name": "metric_locks retired per instr",
4249
"name-txn": "metric_locks retired per txn",

cmd/metrics/resources/metrics/x86_64/GenuineIntel/emr_nofixedtma.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@
3737
"expression": "[instructions] / 1000000000",
3838
"origin": "perfspect"
3939
},
40+
{
41+
"name": "metric_branch misprediction ratio",
42+
"name-txn": "metric_branch mispredictions per txn",
43+
"expression": "[BR_MISP_RETIRED.ALL_BRANCHES] / [BR_INST_RETIRED.ALL_BRANCHES]",
44+
"expression-txn": "[BR_MISP_RETIRED.ALL_BRANCHES] / [TXN]",
45+
"origin": "perfspect"
46+
},
4047
{
4148
"name": "metric_locks retired per instr",
4249
"name-txn": "metric_locks retired per txn",

0 commit comments

Comments
 (0)