Fully featured low overhead profiler for Java EE and Java SE platforms.
Performance monitoring and profiling of Jenkins, TeamCity, Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Tracing a Java Agent?

Moderators: Vladimir Kondratyev, Anton Katilin

Tracing a Java Agent?

Postby rstheo » Wed Oct 02, 2019 2:58 pm

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:


Is there another way I can configure the YourKit agent so that execution of the Java Agent's premain method can be traced?
Posts: 1
Joined: Wed Oct 02, 2019 2:51 pm

Re: Tracing a Java Agent?

Postby Anton Katilin » Thu Oct 03, 2019 6:47 am

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.
Anton Katilin
Posts: 5823
Joined: Wed Aug 11, 2004 8:37 am

Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 13 guests