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

Enable multiple probes with wildcards

Moderators: Vladimir Kondratyev, Anton Katilin

Enable multiple probes with wildcards

Postby jensm » Mon Dec 19, 2016 7:16 pm

Hello all,

I'm currently programming some probes for the Java YoutKit profiler to profile
some party of Eclipse.

To start I created two probes (just to give it a try) with the name MyProbe1 and MyProbe2.
With
Code: Select all
-agentpath:.../libyjpagent.jnilib=probe_on=MyProbe1,probebootclasspath=.../probes.jar

I get MyProbe1 working and with
Code: Select all
-agentpath:.../libyjpagent.jnilib=probe_on=MyProbe1,probebootclasspath=.../probes.jar

I get MyProbe2 working. I think I will have more than just two probes, so I
try to enable both with a wildcard, as described in
(see also https://www.yourkit.com/docs/java/help/ ... probes.jsp)

But I did not get both with a wildcard working. I tried:
Code: Select all
-agentpath:.../libyjpagent.jnilib=probe_on=*,probebootclasspath=.../probes.jar

Then I move them to a package with name probes and try:
Code: Select all
-agentpath:.../libyjpagent.jnilib=probe_on=probes.*,probebootclasspath=.../probes.jar
-agentpath:.../libyjpagent.jnilib=probe_on=probes.My*,probebootclasspath=.../probes.jar

With both parameters I did not get them working. Even I did not see them in the Profiler.

Is there a way to enable several probes with a simple parameter or can I define
a startup method, where I can register my probes. I have to do this from outside
the application. I can't add the probes to the application classpath and register
them from there :(

Java...: 1.8.0_111 64-bit
YoutKit: 2016.02-b45
OS.....: Mac OS X

Any help is welcome. Thanks in advanced.

Best Regards,

Jens
jensm
 
Posts: 1
Joined: Mon Dec 19, 2016 6:47 pm

Re: Enable multiple probes with wildcards

Postby Anton Katilin » Mon Dec 19, 2016 10:17 pm

Hi Jens

Custom probes cannot be enabled with a wildcard. Instead, their class names should be specified in full and explicitly.

So, please try probe_on=MyProbe1,probe_on=MyProbe2,probebootclasspath=.../probes.jar

Best regards,
Anton
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am

Re: Enable multiple probes with wildcards

Postby Anton Katilin » Mon Dec 19, 2016 10:22 pm

P.S. Please note that probes implemented as inner classes are enumerated.

For example, if you have an outer class MyProbes with inner classes Probe1 and Probe2, "probe_on=MyProbes" should load Probe1 and Probe2. Please see source code of the built-in probes - many of them use this approach.
Anton Katilin
 
Posts: 5575
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: Bing [Bot] and 10 guests