On Mon, 28 Oct 2024 21:26:38 GMT, Phil Race <[email protected]> wrote:

> https://bugs.openjdk.org/browse/JDK-8338677 already improved things for this 
> so that's good.
> 
> This fix adds to it lazy initialisation of VarHandles in StrikeCache at the 
> cost of some extra code.
> Since these VarHandles get used more or less immediately on Linux this new 
> fix won't further improve matters there
> But should help on Mac where they aren't usually needed at startup
> And Windows is somewhere in between.

>From the FFM API pov, we might be able to make the VarHandle lazy, that it 
>contains symbolic information and is fully expanded upon first use, 
>effectively the same as the laziness here. Don't know if this works for FFM, 
>but this is how java lang invoke ones work if they have to initialize classes. 
>If such laziness is implemented, we can always revisit the existing uses 
>later. This patch is fine as long as there is no bad side effects.

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

PR Comment: https://git.openjdk.org/jdk/pull/21748#issuecomment-2522095066

Reply via email to