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.

YourKit does not capture cpu/allocation profiler from JNA

Moderators: Vladimir Kondratyev, Anton Katilin

YourKit does not capture cpu/allocation profiler from JNA

Postby test1 » Thu Nov 27, 2014 6:17 am

Hi,

It looks like YourKit does not seem to work properly with JNA. I have some code being called from native code into Java code. All the code running on Java thread works fine. However, code from JNA initiated threads does not show up in either CPU sampling or memory allocation report. Some of that shows up in CPU tracing result though. Is it expected?
test1
 
Posts: 9
Joined: Tue Aug 23, 2005 5:21 pm

Re: YourKit does not capture cpu/allocation profiler from JN

Postby Anton Katilin » Thu Nov 27, 2014 7:07 am

Hi,

Do you mean https://github.com/twall/jna ?

We are not aware of the problem, perhaps it's on the JNA side. CPU profiling of and object allocation recording in "regular" JNI calls work just fine.

Could you please provide an example of code demonstrating the problem.

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

Re: YourKit does not capture cpu/allocation profiler from JN

Postby Anton Katilin » Mon Dec 01, 2014 10:59 am

Any update? Or should we close the issue?
Anton Katilin
 
Posts: 5677
Joined: Wed Aug 11, 2004 8:37 am

Re: YourKit does not capture cpu/allocation profiler from JN

Postby test1 » Tue Dec 02, 2014 8:04 pm

It looks like it only captures the data for the first call. If a native thread is used for callback, it will use do JNI_Attach/JNI_Detach everytime. After JNI_Detach is called, YourKit will not be able to profile that thread anymore. The same thing seems to apply for Java WatchService callback.
test1
 
Posts: 9
Joined: Tue Aug 23, 2005 5:21 pm

Re: YourKit does not capture cpu/allocation profiler from JN

Postby Anton Katilin » Tue Dec 02, 2014 9:14 pm

Could you please provide code example(s) reproducing the problem.
Anton Katilin
 
Posts: 5677
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: Baidu [Spider] and 13 guests