JVM进阶 -- MAT

栏目: Java · 发布时间: 6年前

内容简介:Shallow heap is theRetained set of X is the set of objects which would be removed by GC when X is garbage collected.Retained heap of X is the

Shallow heap is the memory consumed by one object . An object needs 32 or 64 bits (depending on the OS architecture) per reference, 4 bytes per Integer, 8 bytes per Long, etc. Depending on the heap dump format the size may be adjusted (e.g. aligned to 8, etc…) to model better the real consumption of the VM.

Retained Set

Retained set of X is the set of objects which would be removed by GC when X is garbage collected.

Retained Heap

Retained heap of X is the sum of shallow sizes of all objects in the retained set of X , i.e. memory kept alive by X.

Generally speaking, shallow heap of an object is its size in the heap and retained size of the same object is the amount of heap memory that will be freed when the object is garbage collected .

JVM进阶 -- MAT The Minimum Retained Size gives a good (under)estimation of the retained size which is calculated ways faster than the exact retained size of a set of objects. It only depends on the number of objects in the inspected set , not the number of objects in the heap dump.

Dominator Tree

Memory Analyzer provides a dominator tree of the object graph. The transformation of the object reference graph into a dominator tree allows you to easily identify the biggest chunks of retained memory and the keep-alive dependencies among objects .

Dominate

An object x dominates an object y if every path in the object graph from the start (or the root) node to y must go through x.

Immediate Dominator

The immediate dominator x of some object y is the dominator closest to the object y.

Properties

  1. The objects belonging to the sub-tree of x (i.e. the objects dominated by x) represent the retained set of x.
  2. If x is the immediate dominator of y , then the immediate dominator of x also dominates y , and so on.
  3. The edges in the dominator tree do not directly correspond to object references from the object graph.

JVM进阶 -- MAT A dominator tree is built out of the object graph. In the dominator tree each object is the immediate dominator of its children , so dependencies between the objects are easily identified.

Overview

JVM进阶 -- MAT

Dominator Tree

No Grouping(Objects)

JVM进阶 -- MAT

Group By Class

JVM进阶 -- MAT

Group By Class Loader

纬度:组件

JVM进阶 -- MAT

Group By Package

纬度:自身编写的代码

JVM进阶 -- MAT

Path To GC Roots

JVM进阶 -- MAT JVM进阶 -- MAT

Histogram

JVM进阶 -- MAT MAT默认按 Shallow Heap 倒排,手动选择按 Retained Heap 倒排,排第一的是 EhcacheOnHeapStore


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

成为乔布斯

成为乔布斯

[美] 布伦特·施兰德、[美] 里克·特策利 / 陶亮 / 中信出版集团 / 2016-10 / 69.00元

本书描绘了一位多姿多彩的人物将与生俱来的激情与成熟的管理方式相结合,打造出史上最有价值、最受消费者追捧的公司,这本书将彻底改变我们看待乔布斯的方式。 本书推翻了关于史蒂夫·乔布斯的传说和陈词滥调,比如他是天才和混蛋的结合体,暴躁易怒、自私自利,怠慢朋友与家人。本书揭示了这位苹果联合创始人和CEO的家庭生活与职业生涯,并回答了一个关键问题:为什么如此轻狂傲慢、以至于被赶出苹果的年轻人能成为史上......一起来看看 《成为乔布斯》 这本书的介绍吧!

SHA 加密
SHA 加密

SHA 加密工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试