RFR: 8356693: AOT assembly phase fails with -javaagent
Aleksey Shipilev
shade at openjdk.org
Mon May 12 17:58:52 UTC 2025
On Mon, 12 May 2025 17:21:30 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> src/hotspot/share/prims/jvmtiAgent.cpp line 588:
>>
>>> 586: // Agents are allowed with -XX:AOTMode=record and -XX:AOTMode=on/auto.
>>> 587: // Agents are completely disabled when -XX:AOTMode=create
>>> 588: assert(!CDSConfig::is_dumping_final_static_archive(), "agents should have been disabled with -XX:AOTMode=create");
>>
>> Is there a point in asserting this? I am thinking users would pass the same command line to `-XX:AOTMode=create` without thinking twice. And since we are doing the right thing, ignoring the agents, it seems we "only" need to print the user-visible warning. Maybe not even that, and just return?
>
> If someone removes the call to `JvmtiAgentList::disable_agent_list()`, we will come to here and exit the JVM. This assert is to guard against that.
OK, that makes sense.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25170#discussion_r2085175665
More information about the hotspot-dev
mailing list