如何在 Java VisualVM 中查看内存分配堆栈跟踪 [英] How to view memory allocation stacktrace in Java VisualVM

查看:32
本文介绍了如何在 Java VisualVM 中查看内存分配堆栈跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

本文介绍了如何在 Java VisualVM 中查看内存分配堆栈跟踪:http://rejeev.blogspot.de/2009/04/analyzing-memory-leak-in-java.html

This article describes how to view memory allocation stacktrace in Java VisualVM: http://rejeev.blogspot.de/2009/04/analyzing-memory-leak-in-java.html

简而言之,在 Java VisualVM 选项中定义自定义预设并选中内存设置选项卡中的记录分配堆栈跟踪"复选框.

In short, define a custom preset in the Java VisualVM options and check the "record allocations stack traces" checkbox in the memory settings tab.

现在,当我选择该自定义预设并启动内存分析时,我仍然无法查看内存分配堆栈跟踪.没有文章中描述的右键单击项目操作拍摄快照并显示分配堆栈跟踪",也没有类似的操作.我使用的是 VisualVM 1.7.

Now, when I select that custom preset and start memory profiling, I still cannot view the memory allocation stacktrace. There is no right-click-on-item action "Take snapshot and show allocation stack traces" as described in the article, nor a anything like that. I am using VisualVM 1.7.

如何查看这些分配堆栈跟踪?

How can I view these allocation stack traces?

推荐答案

Sampler 选项卡中启用 Memory 分析,然后按 堆转储按钮.

Enable Memory profiling in Sampler tab, then press a Heap Dump button.

这篇关于如何在 Java VisualVM 中查看内存分配堆栈跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆