<p>I just installed Java 1.6_07 so I could try profiling with VisualVM.  It tells me that my app is spending 60% of its time in <code>sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run</code> </p>

<p>How do I find out what it was doing during that time?  How much of the time was it waiting for something to call it, or doing something else?  What was calling it and what was it calling?  I just can't seem to find any way to drill down to deeper levels like there is in Quantify or the Perl profiler.</p>

[{'answer_id': 59121, 'author': 'Tim Howland', 'author_id': 4276, 'author_profile': 'https://Stackoverflow.com/users/4276', 'pm_score': 2, 'selected': False, 'text': "<p>Does your App use RMI over TCP? If not, is it possible that this is a heisenbug, caused by instrumenting the VM? I assume VisualVM must use RMI calls to figure out what's going on in the JVM....</p>\n"}, {'answer_id': 187021, 'author': 'Charles Duffy', 'author_id': 14122, 'author_profile': 'https://Stackoverflow.com/users/14122', 'pm_score': 4, 'selected': True, 'text': '<p>I don\'t have experience with VisualVM -- but JRockit\'s profiler <em>does</em> provide this information; you may consider using it instead.</p>\n\n<p><strong>Update:</strong> a question with a list of java profilers can be found <a href="https://stackoverflow.com/questions/14762/please-recommend-a-java-profiler">here</a>, for users with sufficient rep to view deleted questions.</p>\n'}, {'answer_id': 1624142, 'author': 'Yuval F', 'author_id': 1702, 'author_profile': 'https://Stackoverflow.com/users/1702', 'pm_score': 1, 'selected': False, 'text': '<p>I have started using <a href="https://visualvm.dev.java.net/" rel="nofollow noreferrer">the new VisualVM 1.2</a>. It allows profiling CPU and drilling down using a call graph. Try it out.</p>\n'}, {'answer_id': 6037264, 'author': 'CodeboyUp', 'author_id': 758139, 'author_profile': 'https://Stackoverflow.com/users/758139', 'pm_score': 1, 'selected': False, 'text': "<p>Using 1.3.2 also seeing this being the reported hangup I am hitting. In 1.3.2 if you do a thread dump and look for this call you can see where it lands in the call chain for that thread. Not sure if Yuval F was referring to this or something else. Look up the call chain to see what it's calling and so on, look down to see what it's being called by and so on.</p>\n"}]
['https://Stackoverflow.com/questions/58886', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3333/']