On Wed, 6 May 2026 12:15:09 GMT, Thomas Schatzl <[email protected]> wrote:

>> _Actually_, I believe not using Serial for small tools is completely in line 
>> with the intent of JEP 523, so it would be a proverbial dog-fooding to rely 
>> on G1 for small tools. If G1 is significantly slower in scenario where 
>> Serial used to be a better choice, OpenJDK developers should be the first to 
>> suffer :)
>
> In my somewhat limited local tests (for jep 523), the difference of using g1 
> for everything is <1% non-significant for a full slowdebug rebuild (in all 
> metrics, i.e. user/sys/cpu/total time, 5 runs, alpha=0.05), i.e. a `make 
> images`.
> 
> I am fine with just removing the -XX:+SerialGC optimization. I did notice 
> that comment, and agree with you, but did not want to do extensive build perf 
> testing.
> 
> See also 
> https://bugs.openjdk.org/browse/JDK-8359802?focusedId=14802646&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14802646
>  on a different machine.
> 
> If nobody objects I'll remove this optimization after some more testing.

If default GC choice and sizing is good enough, I'm all for dropping the 
explicit flags. Back when we set serialgc, I believe the difference was quite 
significant. If you can show that the difference is negligible, then please 
remove it.

If the difference is still relevant, then the correct fix is to only modify the 
BUILD_JAVA flags, and then only if we are using the just built JDK as 
BUILD_JDK. Looking at the code, as Alexey pointed out, we aren't even setting 
serialgc in the BUILD_JAVA_FLAGS_SMALL. We are however setting 
JAVA_TOOL_FLAGS_SMALL based on JAVA_FLAGS_SMALL, and we then use 
JAVA_TOOL_FLAGS_SMALL with JMOD, which is run from the BUILD_JDK. That is a 
bug. We need a separate BUILD_JAVA_TOOL_FLAGS_SMALL. Is it the jmod command 
that failed when you disabled serialgc, or something else?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31049#discussion_r3195646601

Reply via email to