Tracing a Java Agent?

Questions about YourKit Java Profiler
Post Reply
rstheo
Posts: 1
Joined: Wed Oct 02, 2019 2:51 pm

Tracing a Java Agent?

Post by rstheo »

Is it possible to trace the execution of the premain method of a Java Agent using YourKit? I tried this and it looked like the YourKit native agent and the Java Agent (specified by -javaagent:<agent.jar>) I wanted to trace came up at the same time and the Java Agent premain execution was skipped.

This is how I specified the yourkit commandline options:

-agentpath:/path/libyjpagent.so=port=10000,sessionname=prov,dir=/path/,tracing

Is there another way I can configure the YourKit agent so that execution of the Java Agent's premain method can be traced?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Tracing a Java Agent?

Post by Anton Katilin »

Exactly what method you want to trace?

The agent cannot trace all methods during JVM initialization because it is not possible to resolve dependencies. Instead, tracing actually starts at some later phase. There are no other profiler agent configuration options to let tracing start earlier.
Post Reply