Please review and improve JDK-8362173: Upgrade AOT Cache logging to support viewing and browsing contents and usage
ioi.lam at oracle.com
ioi.lam at oracle.com
Mon Jul 28 17:51:28 UTC 2025
I have created a draft PR for JDK-8362566: Use -Xlog:aot+map to print
contents of existing AOT cache
- https://github.com/openjdk/jdk/pull/26514
It's more involved than I expected, but I got most of the mechanics to
work. I will clean it up so we will have a single version of the logging
code that works in both the assembly phase and production run.
This PR makes it possible to call the various XXX::print_on() functions
in the metadata types, so we can see more detailed information (to be
implemented in JDK-8363440). Here's an example for ConstantPool:
0x0000000800539cb0: @@ ConstantPool 1000 java.lang.Object
{constant pool}
- flags: 0x6 on_stack
- holder: 0x00000008000f8798
- cache: 0x00000008003a8a20
- resolved_references: 0x0000000000000000
- reference_map: 0x0000000800539c40
- resolved_klasses: 0x00000008003a89c0
- cp length: 115
- 1 : Unresolved Class : 'java/lang/StringBuilder'
- 2 : Utf8 : 'java/lang/StringBuilder'
- 3 : Method : klass_index=1 name_and_type_index=4
- 4 : NameAndType : name_index=5 signature_index=6
- 5 : Utf8 : '<init>'
- 6 : Utf8 : '()V'
- 7 : Method : klass_index=8 name_and_type_index=9
- 8 : Class : 'java/lang/Object' {0x00000008000f8798}
- 9 : NameAndType : name_index=11 signature_index=12
- 10 : Utf8 : 'java/lang/Object'
Thanks
- Ioi
On 7/14/25 7:50 AM, Andrew Dinn wrote:
> Hi Mat/Team,
>
> Following discussion in last week's dev team meeting I have raised an
> umbrella JIRA https://bugs.openjdk.org/browse/JDK-8362173 to cover
> work that addresses the problem of making it AOT Cache content visible
> to users as well as providing some coherent account of how content is
> selected, generated and consumed.
>
> There are several discussion points that I mentioned on the JIRA which
> everyone is invited to comment on -- tags to use, keywords to employ
> to label messages, object naming, data formats etc. We should try at
> least achieve some basic level of agreement on them in the next week
> or two.
>
> Mat, the JIRA proposes initially pursuing the idea you suggested you
> of modifying the code that loads and validates AOT cache during a
> production run to also provide a comprehensive log message 'audit' of
> all cache content. If you are still able to pursue that task then
> please raise and assign to yourself a sub-task under the above JIRA to
> cover that work.
>
> Mat, I'd also like to introduce you to Maria Arias de Reyna (in cc)
> who just returned from maternity leave and attended last week's
> meeting. Maria wrote most of the Quarkus blog post on Leyden we
> published last year and was, at that time, adapting the AOT log
> processing tool provided by te Spring boot team. She would be very
> interested in taking this further to cover analyzng and summarizing
> the 'audit' message content and enabling users to search and browse
> the set of cache elements it describes. So, please say hello to her
> and do keep her up to date with any progress you are able to make on
> the audit logging side.
>
> Thanks!
>
> regards,
>
>
> Andrew Dinn
> -----------
>
More information about the leyden-dev
mailing list