简体   繁体   English

哪些Java内存探查器应用程序可以在Windows 7 64位和Java 1.4 32位上运行?

[英]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 检查以下链接

http://www.eclipse.org/mat/ http://www.eclipse.org/mat/

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: 我最终做了以下工作:

  1. Add the -XX:HeapDumpPath=C:\\Temp\\HeapDump argument when starting the app 启动应用程序时添加-XX:HeapDumpPath=C:\\Temp\\HeapDump参数
  2. Wait until it crashes with OutOfMemory exception 等到它崩溃并显示OutOfMemory异常
  3. Use Memory Analyzer (MAT) to see what was using so much memory. 使用内存分析器(MAT)来查看正在使用太多内存的内容。

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.

相关问题 Solr - 在Windows 7 64位上使用64位Java,而不是32位Java - Solr - use 64-bit Java, not 32-bit Java on Windows 7 64-bit 在Java 32位和Java 64位之间切换 - Switch between Java 32-bit and Java 64-bit 用java在64位机器上运行32位dll - Running 32-bit dll on 64-bit machine in java InnoSetup:检测 Java 是 32 位还是 64 位 - InnoSetup: Detect if Java is 32-bit or 64-bit 64位计算机上的32位Java辅助功能 - 32-bit Java Accessibility on a 64-bit machine Java 32位与64位兼容性 - Java 32-bit vs 64-bit compatibility 在 64 位上发送 ctrl-break 到 java 进程 Windows ala sendsignal 在 32 位上 - Send ctrl-break to java process on 64-bit Windows ala sendsignal on 32-bit java.lang.UnsatisfiedLinkError:无法在Windows中的64位JVM上加载32位SWT库 - java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM in windows Yourkit java profiler:无法启动:无法自动检测是使用32位还是64位JVM - Yourkit java profiler : Cannot launch: it's impossible to automatically detect whether a 32-bit or a 64-bit JVM will be used 安装Java 8 Update 20之后,64位Java的行为类似于32位Java-很奇怪 - 64-bit java acting like 32-bit Java after installing Java 8 Update 20 - Weird
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM