`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".
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.
```
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".
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.
- relates to
-
JDK-8311164 CPU_HT is set randomly on hybrid CPUs like Alder Lake
-
- Closed
-
- links to
-
Review(master) openjdk/jdk/26808