简体   繁体   English

Java VisualVM是否提供堆转储的正确堆大小(.hprof文件)

[英]Does Java VisualVM gives correct Heap Size of heap dump (.hprof file)

I am analyzing a OutOfMemory issue. 我正在分析一个OutOfMemory问题。 I got a dump of 800 MB (.hprof file) when i open it in MAT it shows heap size 53.2 MB as below 当我在MAT中打开它时,我获得了800 MB(.hprof文件)的转储,它显示堆大小为53.2 MB,如下所示

在此输入图像描述

Same dump i opened in Java VisualVM and I see Heap size around 769 MB 我在Java VisualVM中打开了相同的转储,我看到堆大小约为769 MB

  Date taken: Tue Mar 18 05:25:59 IST 2014 File: C:\\Users\\ABC\\Desktop\\Memory\\MemoryDump.hprof File size: 789.1 MB Total bytes: 768,683,549 Total classes: 9,288 Total instances: 7,081,010 Classloaders: 2,924 GC roots: 2,496 Number of objects pending for finalization: 0 

I read one article which shows MAT skips unreachable objects so doesnt report exact heap size. 我读了一篇文章 ,显示MAT跳过无法访问的对象,因此没有报告确切的堆大小。

What does Total Bytes of VisulaVM shows here : Heap Size or (Heap + Non Heap size) or anything else? VisulaVM的Total Bytes在这里显示的是什么:堆大小或(堆+非堆大小)或其他什么?

Total Bytes是堆转储中所有对象的大小的总和。

Eclipse MAT removes the unreachable object and other junk left over by GC in JVM. Eclipse MAT删除了JVM中GC无法访问的对象和其他垃圾。 Read more: 阅读更多:

http://wiki.eclipse.org/MemoryAnalyzer/FAQ#Problems_Interpreting_Results http://wiki.eclipse.org/MemoryAnalyzer/FAQ#Problems_Interpreting_Results

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM