RFR: 8352187: Don't start management agent during AOT cache creation [v2]

Alan Bateman alanb at openjdk.org
Tue Jun 3 09:41:59 UTC 2025


On Mon, 2 Jun 2025 16:50:14 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> If a management agent is specified when creating an AOT cache, it resulted in `java.lang.IllegalArgumentException`.
>> To avoid the exception, this fix is not to start the management agent when creating an AOT cache.
>> 
>> Passed tiers 1 - 4 testing.
>
> Calvin Cheung has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Update test/hotspot/jtreg/runtime/cds/appcds/aotCache/ManagementAgent.java
>    
>    Co-authored-by: Aleksey Shipilëv <shipilev at amazon.de>
>  - place the new test in a new file

> this fix is not to start the management agent when creating an AOT cache.

I think this is good. The initial processing of -Dcom.sun.management will add the jdk.management.agent module to the root set so the set of modules when creating the AOT cache will be the same as runtime, even through the JMX agent isn't started.

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

PR Comment: https://git.openjdk.org/jdk/pull/25562#issuecomment-2934387476


More information about the hotspot-runtime-dev mailing list