RFR: 8307478: Implementation of Prepare to Restrict The Dynamic Loading of Agents
Andrey Turbanov
aturbanov at openjdk.org
Sun May 14 08:22:43 UTC 2023
On Wed, 10 May 2023 11:12:49 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> This is the implementation for JEP 451. There are two parts to this:
>
> 1. A multi-line warning is printed when a JVM TI or Java agent is loaded into a running VM. For JVM TI, the message is printed to stderr from JvmtiAgent::load. For Java agents, it is printed to System.err (as that may be redirected) in the JPLIS (j.l.instrumentation) implementation.
>
> 2. If running with -Djdk.instrument.traceUsage or -Djdk.instrument.traceUsage=true, the calls to the Instrumentation API print a trace message and stack trace.
src/java.instrument/share/classes/sun/instrument/InstrumentationImpl.java line 68:
> 66: public class InstrumentationImpl implements Instrumentation {
> 67: private static final String TRACE_USAGE_PROP_NAME = "jdk.instrument.traceUsage";
> 68: private final static boolean TRACE_USAGE;
Suggestion:
private static final boolean TRACE_USAGE;
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13899#discussion_r1193098588
More information about the hotspot-runtime-dev
mailing list