RFR: 8293116: Incremental JDK build could be sped up [v3]

Erik Joelsson erikj at openjdk.org
Wed Sep 7 16:34:41 UTC 2022


On Wed, 7 Sep 2022 13:57:45 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> ... and also that we *must* include the vardeps file, since any change there should trigger a complete rebuild.
>> 
>> The logic here seems correct, but apparently somewhat hard to fully understand correctly. Maybe a few lines of comments summarizing the important points raised here would be a good thing?
>
>> ... and also that we _must_ include the vardeps file, since any change there should trigger a complete rebuild.
>> 
>> The logic here seems correct, but apparently somewhat hard to fully understand correctly. Maybe a few lines of comments summarizing the important points raised here would be a good thing?
> 
> How about:
> https://github.com/openjdk/jdk/pull/10104/commits/6c1a83b28ee72a99bf24e7f66c96d1294ad485dd
> 
> Thanks,
>     Jan

To clarify my last post. The Main compile rule has this prereq declaration:


$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_FILELIST) $$($1_DEPENDS) \
        $$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS) $$($1_JAVAC_SERVER_CONFIG)

The `$$($1_DEPENDS)` and `$$($1_EXTRA_DEPS)` may contain prereqs/dependencies that we probably should always recompile everything for. The EXTRA_DEPS is where we get the API changes from other modules. The DEPENDS variable is set by the caller and can be anything. Both of these are (deliberately) missing from the FILELIST generation rule, but I think MODFILES generation needs them. Because of this, I think the new MODFILES logic needs to move to the main compilation rule (like in your original patch) but the FILELIST rule should still be left alone.

We need to verify that this still gives us the expected speedup in the common case though. I'm not sure in what situations other dependencies may be included in `$?` here.

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

PR: https://git.openjdk.org/jdk/pull/10104


More information about the compiler-dev mailing list