Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d9d2fbd881a5ee2ca3a91e3e3c49709280c4873e
      
https://github.com/WebKit/WebKit/commit/d9d2fbd881a5ee2ca3a91e3e3c49709280c4873e
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-08-26 (Wed, 26 Aug 2026)

  Changed paths:
    M Source/JavaScriptCore/assembler/CPU.cpp
    M Source/JavaScriptCore/assembler/CPU.h
    M Source/JavaScriptCore/runtime/Options.cpp
    M Source/JavaScriptCore/runtime/OptionsList.h

  Log Message:
  -----------
  [JSC] Detect CPU core configurations more accurately
https://bugs.webkit.org/show_bug.cgi?id=322619
rdar://185922475

Reviewed by Keith Miller.

After M5, we introduced Super Cores, and we may have three categories,
Super, Performance, and Efficiency. And in M6, we started splitting
Performance into Super and Performance, so it can have these three
categories on one device. But the current code is only detecting P0 and
P1, and they can be mapped differently based on devices. Sometimes P0 is
Super and P1 is Performance. Sometimes, P0 is Performance and P1 is
Efficiency. So just checking P0 and P1 are wrong metrics.

This patch introduces CoreCategory and collecting each core number
accurately.

* Source/JavaScriptCore/assembler/CPU.cpp:
(JSC::sysctlInt32):
(JSC::categoryFromPerfLevelName):
(JSC::categoryFromPerfLevelIndex):
(JSC::hwNumberOfCores):
(JSC::hwPerfLevelPhysicalCPUMax): Deleted.
(JSC::hwNumberOfP0Cores): Deleted.
(JSC::hwNumberOfP1Cores): Deleted.
(JSC::hwNumberOfP2Cores): Deleted.
* Source/JavaScriptCore/assembler/CPU.h:
* Source/JavaScriptCore/runtime/Options.cpp:
(JSC::numberOfSuperAndPerformanceCores):
(JSC::overrideDefaults):
* Source/JavaScriptCore/runtime/OptionsList.h:

Canonical link: https://commits.webkit.org/319928@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to