RFR: 8349722: [leyden] Option to block until preloading is complete

Aleksey Shipilev shade at openjdk.org
Mon Feb 10 16:08:22 UTC 2025


On Mon, 10 Feb 2025 16:02:12 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:

>> During one of the meetings, @iwanowww suggested there is a diagnostic option to block the execution until all preloaded code is finished loading. For the Java application, it would then look as if the entirety of preload code was loaded "instantaneously", which helps to estimate the performance floor for a given workload.
>> 
>> I have found no such option in current Leyden prototype, though, so this RFE should implement one. 
>> 
>> This is indeed helpful, especially combined with #32, which allows to run with only C2.
>
> src/hotspot/share/compiler/compileBroker.cpp line 1763:
> 
>> 1761:     bool is_blocking = ReplayCompiles                                             ||
>> 1762:                        !directive->BackgroundCompilationOption                    ||
>> 1763:                        (PreloadBlocking && (compile_reason == CompileTask::Reason_Preload)) ||
> 
> I was thinking may be set `BackgroundCompilation` flag to `false` temporary in `SCCache::preload_startup_code()` which loads all startup code. We do similar thing when dumping CS archive:
> https://github.com/openjdk/leyden/blob/premain/src/hotspot/share/cds/cdsConfig.cpp#L547
> 
> But I am not sure how such temporary setting affects `directive->BackgroundCompilationOption`.

Oh. Let me try.

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

PR Review Comment: https://git.openjdk.org/leyden/pull/36#discussion_r1949411811


More information about the leyden-dev mailing list