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.

Having trouble using both the Java debugger and profiling

Moderators: Vladimir Kondratyev, Anton Katilin

Having trouble using both the Java debugger and profiling

Postby Michael.Scaman » Fri Feb 27, 2015 2:18 pm

Is there a known issue in using the eclipse debugger with your kit when you attach the yjp object from startup?

debug flags = "-Djava.security.debug=all" at the same time the shared object is attached
yjp flags = '-agentpath:/var/lib/yjp-2015-eap-build-15026/bin/linux-x86-64/libyjpagent.so=port=10005'

Is there an issue using the above together . When I use the yjp flags I seem to have to turn off the debug.
Michael.Scaman
 
Posts: 34
Joined: Mon Feb 02, 2015 3:14 pm

Re: Having trouble using both the Java debugger and profilin

Postby Anton Katilin » Fri Feb 27, 2015 2:44 pm

Hi Michael

We are not aware of debugger and profiler incompatibilities, they should work together just fine.

Could you please describe the problem in more detail.

Do you use the Eclipse's Debug action and specify the profiler's '-agentpath option?

Or do you use Run or Profile actions?

Do you use the standard Java launcher executable "java"?

Also, please use the latest EAP build instead of 15026.

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

Re: Having trouble using both the Java debugger and profilin

Postby Michael.Scaman » Fri Feb 27, 2015 5:00 pm

I will try again with the latest build and let you know. Thanks.
Michael.Scaman
 
Posts: 34
Joined: Mon Feb 02, 2015 3:14 pm

Re: Having trouble using both the Java debugger and profilin

Postby bcalmac » Fri Apr 22, 2016 2:45 am

I'm seeing this when starting Java through the Advanced Installer service launcher (AI 10, Java 7). Then I've accidentally discovered that it works if the debug arg comes first and fails if the yjp arg comes first:

-agentpath:C:\tools\yjp\bin\win64\yjpagent.dll=dir=. -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5000

Code: Select all
[YourKit Java Profiler 2016.02-b34] Log file: C:\Users\bca\.yjp\log\SynapDM.exe-4664.log
ERROR: JDWP unable to get necessary JVMTI capabilities.


-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5000 -agentpath:C:\tools\yjp\bin\win64\yjpagent.dll=dir=.

Code: Select all
[YourKit Java Profiler 2016.02-b34] Log file: C:\Users\bca\.yjp\log\SynapDM.exe-2308.log
Listening for transport dt_socket at address: 5000


Note that I cannot reproduce the problem when running a HelloWorld application from the command line or with an application server like JBoss. If anyone runs into this again, try switching the args order, it might work.
bcalmac
 
Posts: 13
Joined: Tue Apr 29, 2008 6:15 pm

Re: Having trouble using both the Java debugger and profilin

Postby Anton Katilin » Fri Apr 22, 2016 1:13 pm

Try to specify the agent startup option "withdebugger":
-agentpath:C:\tools\yjp\bin\win64\yjpagent.dll=dir=.,withdebugger
Anton Katilin
 
Posts: 5574
Joined: Wed Aug 11, 2004 8:37 am

Re: Having trouble using both the Java debugger and profilin

Postby bcalmac » Fri Apr 22, 2016 10:19 pm

Yes. The "withdebugger" option fixes it!
bcalmac
 
Posts: 13
Joined: Tue Apr 29, 2008 6:15 pm

Re: Having trouble using both the Java debugger and profilin

Postby Anton Katilin » Mon Apr 25, 2016 8:47 am

Thank you for the confirmation.
Anton Katilin
 
Posts: 5574
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests