-
Notifications
You must be signed in to change notification settings - Fork 328
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
Use macOS 12 / iOS 15 perflevel sysctls for better cache info on Apple Platforms #101
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase on the current top-of-tree. Current diff is hard to read.
src/arm/mach/init.c
Outdated
@@ -128,7 +182,7 @@ static enum cpuinfo_uarch decode_uarch(uint32_t cpu_family, uint32_t cpu_subtype | |||
#endif | |||
} | |||
|
|||
static void decode_package_name(char* package_name) { | |||
static void decode_hw_machine_package_name(char* package_name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change looks unrelated. Please revert or move into a separate PR.
* iOS 15 and macOS Monterey 12 added sysctls to describe configuration information | ||
* where not all cores are the same (number of cores, cache sizes). | ||
* | ||
* Each perflevel sysctl has a prefix of `hw.perflevel??.` where ?? is the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are perflevels reported by OS ordered? cpuinfo orders cores and logical processors from the most performant to the least performance, so cpuinfo_get_core(0)
is the the fastest core and cpuinfo_get_core(cpuinfo_get_cores_count() - 1)
is the most power-efficient core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to cache-info
look unrelated, they should go into a separate PR.
44a2c54
to
61b708b
Compare
No description provided.