[webkit-changes] [WebKit/WebKit] 79593c: [JSC] Use sysctlbyname instead of cpuid 7 0
Yusuke Suzuki
noreply at github.com
Thu Sep 8 10:28:19 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 79593cc8b0052872f01a59ff681db93bf7cae298
https://github.com/WebKit/WebKit/commit/79593cc8b0052872f01a59ff681db93bf7cae298
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2022-09-08 (Thu, 08 Sep 2022)
Changed paths:
M Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp
Log Message:
-----------
[JSC] Use sysctlbyname instead of cpuid 7 0
https://bugs.webkit.org/show_bug.cgi?id=244926
Reviewed by Justin Michaud.
This patch avoids issuing cpuid 7 0. Many hypervisor intercept it to modify the result slightly,
so we would like to avoid issuing this even though it is issued once per process.
This patch uses sysctlbyname on Darwin, which queries the same information to XNU.
XNU can potentially cache the result internally, and we can avoid issuing it for
every process launch.
* Source/JavaScriptCore/assembler/MacroAssemblerX86Common.cpp:
(JSC::MacroAssemblerX86Common::collectCPUFeatures):
Canonical link: https://commits.webkit.org/254276@main
More information about the webkit-changes
mailing list