As stated in Java How To ... The -javaagent: Option:
An agent is just an interceptor in front of your main method, executed in the same JVM and loaded by the same system classloader, and governed by the same security policy and context.
The name is misleading, since the word agent usually suggests something working remotely and separately from the primary entity. But it turns out the java agent as used in -javaagent: is much simpler than that.
One java application may have any number of agents by using -javaagent: option any number of times. Agents are invoked in the same order as specified in options.
Each agent may also take String-valued args. I guess that's the reason why we have to use this option multiple times for multiple agents. Otherwise, we could've just done something like:
-javaagent agent1.jar:agent2.jar
, which is incorrect.
So, by putting the profiler agent (e.g. YourKit, JIP, etc.) before your own agent will give the debugging control to you.