allocation-instrumenter icon indicating copy to clipboard operation
allocation-instrumenter copied to clipboard

Dynamic attach java agent

Open brianfromoregon opened this issue 9 years ago • 1 comments

JOL has this neat way of attaching the agent at runtime to avoid requiring users to pass -javaagent on the cmdline. http://hg.openjdk.java.net/code-tools/jol/file/9c716b63a6cf/jol-core/src/main/java/org/openjdk/jol/util/InstrumentationSupport.java

Would you be willing to adopt that approach in this lib?

brianfromoregon avatar May 14 '15 19:05 brianfromoregon

It's probably okay to have it in there, as long as both methods were supported.

Note that that approach is very implementation-dependent, so we'd have to tell people "try it out, and if it doesn't work, then try it with -javaagent". That might make it harder, rather than easier, to deploy - you have to be aware of the target platform.

That said, I'm unlikely to prioritize it, so we'd need someone to implement it.

jhmanson avatar May 14 '15 20:05 jhmanson