RFR: 8374926: EnableX86ECoreOpts was not enabled on some hybrid CPU [v3]
Volodymyr Paprotski
vpaprotski at openjdk.org
Fri Jan 16 01:15:16 UTC 2026
On Sun, 11 Jan 2026 07:46:33 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
>> `EnableX86ECoreOpts` has been introduced in [JDK-8319429](https://bugs.openjdk.org/browse/JDK-8319429), however model numbers which should be enabled are hard-coded, so the flag would not be enabled by default on some models like Arrow Lake.
>>
>> I ran a [benchmark](https://github.com/YaSuenag/garakuta/tree/master/randminmax) to check for effectiveness of `-XX:+EnableX86ECoreOpts` with JDK 25.0.1 on Windows 11 25H2, I saw performance improvement a bit on Intel Core 5 Ultra 225U as following:
>>
>> Disabled (default)
>>
>> Benchmark Mode Cnt Score Error Units
>> RandMinVal.getMax thrpt 3 9707774.405 ± 27082629.015 ops/s
>> RandMinVal.getMin thrpt 3 7510319.839 ± 10923547.382 ops/s
>>
>>
>> Enabled
>>
>> Benchmark Mode Cnt Score Error Units
>> RandMinVal.getMax thrpt 3 10127809.127 ± 45404142.338 ops/s
>> RandMinVal.getMin thrpt 3 8467677.056 ± 1211998.200 ops/s
>>
>>
>> So I think it is better to enable this flag by default on all of hybrid CPUs.
>>
>>
>> To check what processor would be enabled E-core optimization, I made a [commit](https://github.com/openjdk/jdk/commit/f363ea1436b8100021fdac87b48ec43bcf6820af) to add comments for CPU models at first. I couldn't find out all of models (some models has not listed in SDM vol.4 so far), but most of models (excepts Sierra Forest) could be treated as hybrid CPU. Fortunately HotSpot identify hybrid flag from `CPUID`, so we can leverage it for this purpose.
>
> Yasumasa Suenaga has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
>
> - Merge remote-tracking branch 'origin/master' into ecoreopt-hybrid
> - Merge remote-tracking branch 'origin/master' into ecoreopt-hybrid
> - Use supports_hybrid() to check for EnableX86ECoreOpts
> - Add comments for CPU models
For CWF (model `0xDD`), `hy-core-check.c` prints:
Hybrid: 0
HT: 1
Max leaf: 0x28
and for SRF (model `0XAF`):
Hybrid: 0
HT: 1
Max leaf: 0x23
When I added EnableX86ECoreOpts , I remember thinking that I need to 'make it more generic or there will be a lot of models to add manually'. Here we are :(
I need to do more research (and perhaps find some people to talk to..); specifically for client-part numbers.
Some reasons why I hadn't made it (yet?) more generic.. `EnableX86ECoreOpts` is supposed to be 'temporary' (the definition of which, for processors, is 'years'..). It currently enables 'emulation' type of (de)optimizations.. places where Atom cores have some catching up to do, but hopefully should be fixed:
- MXCSR signaling flags
- `vblendvp{sd}` emulation
- pcmpestri 'emulation' in String.indexof
- generate_fill (which perhaps could go under UseAVX=2 with more work/testing)
In other words: we will at some point need to _disable_ `EnableX86ECoreOpts` on future hybrid cores and will again need another cpuid/flag to detect?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29149#issuecomment-3757611722
More information about the hotspot-dev
mailing list