RFR: 8329706: Implement -XX:+AOTClassLinking [v2]

Ioi Lam iklam at openjdk.org
Sat Sep 7 00:34:05 UTC 2024


On Fri, 6 Sep 2024 05:24:18 GMT, David Holmes <dholmes at openjdk.org> wrote:

> I've taken an initial look through but there is an awful lot to try and digest here. I've flagged numerous typos and minor nits.
> 
> One general query: does this stuff work if the user defines their own initial application classloader?

Hi David thanks for the review. I've pushed a new version that has most of your suggestions.

I also added code to avoid loading the CDS archive if it has aot-linked classes, and the user has specified `-Djava.system.class.loader`

> src/hotspot/share/cds/aotLinkedClassBulkLoader.cpp line 86:
> 
>> 84: 
>> 85:   load_table(AOTLinkedClassTable::for_static_archive(),  loader_kind, h_loader, current);
>> 86:   assert(!current->has_pending_exception(), "VM should have exited due to ExceptionMark");
> 
> An `ExceptionMark` only triggers a VM exit on construction and destruction, if an exception is pending.

I refactored the code a bit to handle any exception that occurs during bulk loading, and print our more useful error messages.

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

PR Comment: https://git.openjdk.org/jdk/pull/20843#issuecomment-2334966941
PR Review Comment: https://git.openjdk.org/jdk/pull/20843#discussion_r1747837592


More information about the serviceability-dev mailing list