在 VisualVM 中深入研究

发布于 2024-07-04 08:35:32 字数 263 浏览 4 评论 0原文

我刚刚安装了 Java 1.6_07,因此我可以尝试使用 VisualVM 进行分析。 它告诉我,我的应用程序有 60% 的时间花费在 sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run 上,

我如何找出它在这段时间里做了什么? 它花了多少时间等待调用它,或者做其他事情? 什么在召唤它,它在召唤什么? 我似乎找不到任何方法可以像 Quantify 或 Perl 分析器那样深入到更深的层次。

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 sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

失眠症患者 2024-07-11 08:35:32

您的应用程序是否使用基于 TCP 的 RMI? 如果不是,这是否可能是由虚拟机检测引起的 heisenbug? 我假设 VisualVM 必须使用 RMI 调用来弄清楚 JVM 中发生了什么......

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....

捎一片雪花 2024-07-11 08:35:32

我已经开始使用新的 VisualVM 1.2。 它允许分析 CPU 并使用调用图进行深入分析。 试试看。

I have started using the new VisualVM 1.2. It allows profiling CPU and drilling down using a call graph. Try it out.

半世晨晓 2024-07-11 08:35:32

使用 1.3.2 也看到这是我遇到的报告的挂起。 在 1.3.2 中,如果您执行线程转储并查找此调用,您可以看到它在该线程的调用链中的位置。 不确定 Yuval F 指的是这个还是其他什么。 向上查找调用链以查看它正在调用什么,等等,向下查找以查看它正在被什么调用等等。

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.

顾铮苏瑾 2024-07-11 08:35:32

我没有使用 VisualVM 的经验,但 JRockit 的分析器确实提供了此信息; 您可以考虑使用它。

更新:可以在此处<找到包含java分析器列表的问题< /a>,供具有足够代表的用户查看已删除的问题。

I don't have experience with VisualVM -- but JRockit's profiler does provide this information; you may consider using it instead.

Update: a question with a list of java profilers can be found here, for users with sufficient rep to view deleted questions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文