RFR: 8365633: Incorrect info is reported on hybrid CPU

Yasumasa Suenaga ysuenaga at openjdk.org
Sat Aug 16 14:19:16 UTC 2025


`VM.info` DCmd reports CPU information. I ran this on Intel Core Ultra 5 225U , then I got following result:


CPU: total 14 (initial active 14) (7 cores per cpu, 2 threads per core) family 6 model 181 stepping 0 microcode 0xffffffff, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, erms, clmul, bmi1, bmi2, adx, sha, fma, vzeroupper, clflush, clflushopt, clwb, hv, serialize, rdtscp, rdpid, fsrm, gfni, f16c, cet_ibt, cet_ss
CPU Model and flags from /proc/cpuinfo:
model name : Intel(R) Core(TM) Ultra 5 225U
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm pni pclmulqdq monitor est tm2 ssse3 fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave osxsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch fsgsbase bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni umip gfni vaes vpclmulqdq rdpid ibrs ibpb stibp ssbd


It reports "7 cores per cpu, 2 threads per core". 225U has hybrid architecture - 2 P cores, 8 E cores, 2 LP cores, and also P core has 2 threads per core. Then it should be "12 cores, 14 threads".
https://www.intel.com/content/www/us/en/products/sku/241861/intel-core-ultra-5-processor-225u-12m-cache-up-to-4-80-ghz/specifications.html

According to Intel Software Developer's Manual, it seems to be difficult to get number of physical cores. In Linux kernel, it seems to be calculated by complex logic: https://github.com/torvalds/linux/blob/v6.16/arch/x86/kernel/smpboot.c#L567-L597
In addition, all of P cores might not be enabled HT. Thus to show only number of threads is reasonable at this point.

-------------

Commit messages:
 - 8365633: Incorrect info is reported on hybrid CPU

Changes: https://git.openjdk.org/jdk/pull/26808/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26808&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8365633
  Stats: 13 lines in 2 files changed: 9 ins; 0 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/26808.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26808/head:pull/26808

PR: https://git.openjdk.org/jdk/pull/26808


More information about the hotspot-dev mailing list