RFR: 8307478: Implementation of Prepare to Restrict The Dynamic Loading of Agents [v5]

Alan Bateman alanb at openjdk.org
Sat May 27 08:21:56 UTC 2023


On Fri, 26 May 2023 23:58:12 GMT, Andrei Pangin <apangin at openjdk.org> wrote:

> When testing the proposed patch, I stumbled upon two (related) issues:

Thanks for bringing this up. The question is whether dynamically loading the same same agent library N times is treated as one or N agents. Similarly, if an agent library is specified on the command line, then later the same agent is dynamically loaded and started in the running VM, is it the same agent or not?  Right now, they are treated as different agents, they may have different agent options, they accumulate in the "agent list", each load/start generates a JFR event, and with the changes here, emit a warning. I think we'll need to think a bit more about that scenario as the notion of agent identity doesn't surface in the API docs (the canonical path to the agent library or JAR might do). I agree it could be annoying to have multiple warnings if the profiler is attaching and loading the same agent library many times.

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

PR Comment: https://git.openjdk.org/jdk/pull/13899#issuecomment-1565266475


More information about the hotspot-runtime-dev mailing list