RFR: 8366847: JFR reports incorrect number of cores on hybrid CPU [v5]

Yasumasa Suenaga ysuenaga at openjdk.org
Wed Oct 8 06:17:06 UTC 2025


On Wed, 8 Oct 2025 03:25:52 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix build error
>
> src/hotspot/cpu/x86/vm_version_x86.cpp line 2579:
> 
>> 2577:   if (threads_per_package == 0) {
>> 2578:     // Fallback code to avoid div by zero in subsequent code.
>> 2579:     // CPUID 0Bh (ECX = 1) might return 0 on older AMD processor (EPYC 7763 at least)
> 
> Can we assert that this is not a hybrid CPU?

Maybe yes. I checked `CPUID` 0Bh subleaf 1 on both Core Ultra 5 135U and 225U, they reports correct number of logical processors. However I cannot check all of hybrid CPUs and I'm not sure all of them should return correct value at here. Thus I'm not sure we can add `assert` here for hybrid CPU.

> BTW I assume that "hwThreads" is the number of logical processors - right?

Yes

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27080#discussion_r2412657326
PR Review Comment: https://git.openjdk.org/jdk/pull/27080#discussion_r2412657709


More information about the hotspot-dev mailing list