Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exposing branch misses under macos #587

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/performancecounters/apple_arm_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ struct AppleEvents {
printf("%14s: %llu\n", alias->alias, val);
}*/
return performance_counters{
counters_0[counter_map[0]], counters_0[counter_map[3]],
counters_0[counter_map[0]], counters_0[counter_map[2]],
counters_0[counter_map[2]], counters_0[counter_map[1]]};
}
};
Expand Down
7 changes: 6 additions & 1 deletion benchmarks/performancecounters/event_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ struct event_count {
enum event_counter_types {
CPU_CYCLES,
INSTRUCTIONS,
BRANCH_MISSES = 2,
BRANCH = 4
};

double elapsed_sec() const {
Expand All @@ -49,7 +51,10 @@ struct event_count {
double instructions() const {
return static_cast<double>(event_counts[INSTRUCTIONS]);
}

double branches() const { return static_cast<double>(event_counts[BRANCH]); }
double branch_misses() const {
return static_cast<double>(event_counts[BRANCH_MISSES]);
}
event_count& operator=(const event_count& other) {
this->elapsed = other.elapsed;
this->event_counts = other.event_counts;
Expand Down
Loading