[英]What Java memory profiler applications will work on Windows 7 64-bit with Java 1.4 32-bit?
I'm trying to find a memory leak in an old Java 1.4 application. 我正在尝试在旧的Java 1.4应用程序中发现内存泄漏。 I have tried to use jmp but unfortunately I've had no luck getting it working (is it actually supported in Windows 7?). 我尝试使用jmp,但是不幸的是我没有运气(它在Windows 7中确实受支持吗?)。
If anyone knows of any free/open source Java 1.4 memory profilers that definitely work on Windows 7 64-bit, please let me know. 如果有人知道肯定可以在Windows 7 64位上运行的任何免费/开源Java 1.4内存分析器,请告诉我。
I used JMP until we moved to Java 1.6. 在使用Java 1.6之前,我一直使用JMP。
http://www.khelekore.org/jmp/ http://www.khelekore.org/jmp/
GCViewer is nice if you're just verifying leaks: 如果您只是要验证泄漏,则GCViewer很好:
http://www.tagtraum.com/gcviewer.html http://www.tagtraum.com/gcviewer.html
SAP has contributed a memory analyzer to eclipse which gives very nice and elaborate reports. SAP为Eclipse贡献了一个内存分析器,它提供了非常精美的报表。 check the below link 检查以下链接
Did you already try 你已经尝试过了吗
jps -l
jmap -histo <pid>
And then, I would install Java 6, run the same application, and use: 然后,我将安装Java 6,运行相同的应用程序,并使用:
jconsole
我已经使用了YourKit Java分析器http://www.yourkit.com 。
I ended up doing the following: 我最终做了以下工作:
-XX:HeapDumpPath=C:\\Temp\\HeapDump
argument when starting the app 启动应用程序时添加-XX:HeapDumpPath=C:\\Temp\\HeapDump
参数 You're running on a 1.4 JVM, correct? 您在1.4 JVM上运行,对吗? It's not a 1.4-compiled class running on a 1.6 JVM? 它不是在1.6 JVM上运行的1.4编译类吗? And is there a reason that you can't run the application on a 1.6 JVM, at least in a development environment? 是否有理由至少在开发环境中不能在1.6 JVM上运行应用程序?
If not, the built-in HProf agent should work, at least to find a memory leak. 如果不是这样,则内置的HProf代理应该可以正常工作,至少可以发现内存泄漏。 It will tell you what objects are live when you kill your program, and where they were allocated. 它会告诉您在终止程序时哪些对象是活动的 ,以及它们的分配位置。
I'm not 100% certain, but I believe that you need to use the -Xrunhprof
invocation option (the linked doc invokes with -agentlib
, which I think may have been added in 1.5). 我不确定100%,但是我认为您需要使用-Xrunhprof
调用选项(链接的文档使用-agentlib
调用,我认为可能在1.5中添加了该文件)。 Also, I think there was a version of 1.4 that supported the "modern" debug interface, so could be used with JConsole. 另外,我认为有一个支持“现代”调试接口的1.4版本,因此可以与JConsole一起使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.