Repository navigation
Conversation
This switches uv_cpu_info from using sysctlbyname to using IOKit to get the speed of the processors. macOS on ARM does not currently have the hw.cpufrequency sysctl. We are able to reliable get the clock frequency on all architectures by using IOKit. Fixes: libuv#2911
bnoordhuis
reviewed
Jul 14, 2020
bnoordhuis
left a comment
Member
There was a problem hiding this comment.
Some comments but the basic concept looks good to me!
Contributor
Author
|
Okay, I believe I've addressed your comments @bnoordhuis. Thanks for the feedback! |
bnoordhuis
approved these changes
Jul 20, 2020
bnoordhuis
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks Evan! CI: https://ci.nodejs.org/job/libuv-test-commit/1949/
The only potential snag I see is that repeated calls to uv_cpu_info() become too slow now due to the repeated dlopen/dlsym/dlclose calls, but we'll change it to lazy-load them once if that turns out to be an issue.
4 of 7 tasks
bnoordhuis
pushed a commit
that referenced
this pull request
Aug 4, 2020
This switches uv_cpu_info from using sysctlbyname to using IOKit to get the speed of the processors. macOS on ARM does not currently have the hw.cpufrequency sysctl. We are able to reliable get the clock frequency on all architectures by using IOKit. Fixes: #2911 PR-URL: #2914 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Member
|
Landed in 87f0765, thanks Evan! |
JeffroMF
pushed a commit
to JeffroMF/libuv
that referenced
this pull request
May 16, 2022
This switches uv_cpu_info from using sysctlbyname to using IOKit to get the speed of the processors. macOS on ARM does not currently have the hw.cpufrequency sysctl. We are able to reliable get the clock frequency on all architectures by using IOKit. Fixes: libuv#2911 PR-URL: libuv#2914 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
liujinye-sys
pushed a commit
to open-vela/apps_system_libuv
that referenced
this pull request
Jul 23, 2025
This switches uv_cpu_info from using sysctlbyname to using IOKit to get the speed of the processors. macOS on ARM does not currently have the hw.cpufrequency sysctl. We are able to reliable get the clock frequency on all architectures by using IOKit. Fixes: libuv/libuv#2911 PR-URL: libuv/libuv#2914 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
liujinye-sys
pushed a commit
to open-vela/apps_system_libuv
that referenced
this pull request
Dec 16, 2025
This switches uv_cpu_info from using sysctlbyname to using IOKit to get the speed of the processors. macOS on ARM does not currently have the hw.cpufrequency sysctl. We are able to reliable get the clock frequency on all architectures by using IOKit. Fixes: libuv/libuv#2911 PR-URL: libuv/libuv#2914 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This switches uv_cpu_info from using sysctlbyname to
using IOKit to get the speed of the processors.
macOS on ARM does not currently have the hw.cpufrequency
sysctl. We are able to reliable get the clock frequency
on all architectures by using IOKit.
Fixes: #2911