On Wed, 6 May 2026 13:10:13 GMT, Erik Joelsson <[email protected]> wrote:

>> 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?

I just want to state for the record (again) that despite the nice illusionary 
picture painted by all the `#ifdef INCLUDE_XXX` in the code, it was never a 
goal/expectation to be able to build OpenJDK with an arbitrary combination of 
selected features. The selectivity arose from the requirement to have a Minimal 
VM and Compact Profiles back in JDK 8. And of course as new GCs are developed 
they get their own special include/exclude handling. In that regard Serial GC 
is/was always expected to be present.

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

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

Reply via email to