I don't understand the wording here.
Remi Forax
forax at univ-mlv.fr
Mon Aug 28 21:52:02 UTC 2023
> From: "Ioi Lam" <ioi.lam at oracle.com>
> To: "leyden-dev" <leyden-dev at openjdk.org>
> Sent: Monday, August 28, 2023 11:12:56 PM
> Subject: Re: I don't understand the wording here.
> On 8/27/2023 1:24 PM, Remi Forax wrote:
>> If you play with the premain prototype of Leyden [2], there is a global option
>> -XX:+ArchiveInvokeDynamic that stores all the callsite targets of the first run
>> (training run) inside the CDS archive.
>> Here is an example of how to use the prototype to run maven [3], the first run
>> of maven keep the dynamic information into a CDS archive and a code archive so
>> the next runs re-use those informations to get a faster warmup time.
>> [1] [ https://openjdk.org/projects/leyden/notes/03-toward-condensers |
>> https://openjdk.org/projects/leyden/notes/03-toward-condensers ]
>> [2] [ https://github.com/openjdk/leyden/tree/premain |
>> https://github.com/openjdk/leyden/tree/premain ]
>> [3] [ https://github.com/forax/computed-constant/blob/master/mvn-leyden.bash |
>> https://github.com/forax/computed-constant/blob/master/mvn-leyden.bash ]
> Hi Remi,
> Thanks for trying the premain prototype. It's in very rough shape so it will
> probably cause many surprises ...
Not a lot, my main issue was having a training too short so a lot a compiled methods were not reaching the state 4.
> One thing I want to point out is that the -XX:+ArchiveInvokeDynamic option works
> only with "static CDS dump", e.g., -Xshare:dump.
> It has no effect with "dynamic CDS dump", e.g., the -XX:ArchiveClassesAtExit
> option used by your script in [3] above.
Ahh, thanks for the info,
My first version had the 3 passes, static CDS -> dynamic CDS -> replay, but I wrongly supposed that using 2 passes, dynamic CDS -> replay was possible and I did not checked if the Indy CP rentries were stored in the dynamic CDS.
> I have some docs about using the -XX:+ArchiveInvokeDynamic flag and checking its
> effects:
> [
> https://github.com/openjdk/leyden/blob/premain/test/hotspot/jtreg/premain/InvokeDynamic.md
> |
> https://github.com/openjdk/leyden/blob/premain/test/hotspot/jtreg/premain/InvokeDynamic.md
> ]
Interresting,
(BTW, The link to the prelinker is broken, it is in "src" not "test").
> You can also see some stats like:
> $ java -Xshare:dump -Xlog:cds -XX:+ArchiveInvokeDynamic
> [...]
> [4.209s][info ][cds ] Class CP entries = 19623, archived = 6600 ( 33.6%)
> [4.209s][info ][cds ] Field CP entries = 7867, archived = 2481 ( 31.5%)
> [4.209s][info ][cds ] Method CP entries = 32366, archived = 3354 ( 10.4%)
> [4.209s][info ][cds ] Indy CP entries = 729, archived = 56 ( 7.7%)
> Thanks
> - Ioi
Regards,
Rémi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/leyden-dev/attachments/20230828/7dd083e8/attachment.htm>
More information about the leyden-dev
mailing list