File tree 2 files changed +7
-2
lines changed
benchmarks/performancecounters
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1102,7 +1102,7 @@ struct AppleEvents {
1102
1102
printf("%14s: %llu\n", alias->alias, val);
1103
1103
}*/
1104
1104
return performance_counters {
1105
- counters_0 [counter_map [0 ]], counters_0 [counter_map [3 ]],
1105
+ counters_0 [counter_map [0 ]], counters_0 [counter_map [2 ]],
1106
1106
counters_0 [counter_map [2 ]], counters_0 [counter_map [1 ]]};
1107
1107
}
1108
1108
};
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ struct event_count {
35
35
enum event_counter_types {
36
36
CPU_CYCLES,
37
37
INSTRUCTIONS,
38
+ BRANCH_MISSES = 2 ,
39
+ BRANCH = 4
38
40
};
39
41
40
42
double elapsed_sec () const {
@@ -49,7 +51,10 @@ struct event_count {
49
51
double instructions () const {
50
52
return static_cast <double >(event_counts[INSTRUCTIONS]);
51
53
}
52
-
54
+ double branches () const { return static_cast <double >(event_counts[BRANCH]); }
55
+ double branch_misses () const {
56
+ return static_cast <double >(event_counts[BRANCH_MISSES]);
57
+ }
53
58
event_count& operator =(const event_count& other) {
54
59
this ->elapsed = other.elapsed ;
55
60
this ->event_counts = other.event_counts ;
You can’t perform that action at this time.
0 commit comments