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.

Could not sample the Future<> threads

Moderators: Vladimir Kondratyev, Anton Katilin

Could not sample the Future<> threads

Postby dreamer » Tue May 31, 2016 9:54 pm

Hi,

Recently, we changed our thread pool implementation using Java 8 Future<>. However, after that the Yourkit could not show the active class/method using in the Future<> thread. It always showed that the main thread was waiting. In contrast, the visualvm showed the correct result, however, it is harder to configure on the remote server. Could you guys give us some solution about this issue? Thank you!
dreamer
 
Posts: 3
Joined: Tue May 31, 2016 9:48 pm

Re: Could not sample the Future<> threads

Postby Anton Katilin » Tue May 31, 2016 10:48 pm

Hi,

Could you please provide more detail on the problem: the snapshot file demonstrating it, screenshots of YourKit vs visualvm, etc. If you cannot share them in the forum could you please email them to support@yourkit.com

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

Re: Could not sample the Future<> threads

Postby dreamer » Wed Jun 01, 2016 6:59 am

I tried to mimic the similar logic by using the java lambda and future, it works OK. So I think it's should not the problem of what I said earlier.

I shared the snapshot log here : https://drive.google.com/open?id=0B423M ... WhraVF3eGc

The symptom is that under "hot spots" it only shows the 'java.lang.Thread.run()' took 99% time without internal functions.
Most of the work was running in the "finished threads", I can see some of the functions were listed there if I moved to the green part. Any insight what could be the problem? Thanks.
dreamer
 
Posts: 3
Joined: Tue May 31, 2016 9:48 pm

Re: Could not sample the Future<> threads

Postby Anton Katilin » Wed Jun 01, 2016 10:22 am

Hi,

Thank you for sharing the snapshot.

The symptom is that under "hot spots" it only shows the 'java.lang.Thread.run()' took 99% time without internal functions.

The default filters filter out too much in your case:
https://www.yourkit.com/docs/java/help/filters.jsp
Please turn the filters off, e.g. with "Settings | Apply Filters".

Most of the work was running in the "finished threads"

Please see the startup option "deadthreadlimit":
https://www.yourkit.com/docs/java/help/ ... ptions.jsp

I can see some of the functions were listed there if I moved to the green part.
Sorry, I don't understand. Could you please clarify what you mean with "the green part".

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

Re: Could not sample the Future<> threads

Postby dreamer » Wed Jun 01, 2016 5:52 pm

Aha, it is the filter that caused the problem!
Our project became the apache project recently. And the default filter out all apache.org activities. Now everything comes back! Thank you!
dreamer
 
Posts: 3
Joined: Tue May 31, 2016 9:48 pm

Re: Could not sample the Future<> threads

Postby Anton Katilin » Wed Jun 01, 2016 6:45 pm

Thank you for notifying us that the problem is solved.
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: youthforchange and 6 guests