jvm性能查看工具

jps查看所有java进程。

jconsole

jvisualVM

jmap pid 查看共享对象。
jmap -heap pid 查看java进程堆的相关信息。
jmap -histo pid 查询各种对象占用的内存大小。
jmap -permstat pid 查看Class Loader。
jmap -dump:file=filename,format=b pid dump内存到文件。


jstat -gc pid 间隔时间(ms) 观测各代空间的使用量和GC的统计。
jstat -gccapacity pid 查看内存空间大小。
jstat -gcutil pid 间隔时间(ms) 查看gc次数和内存占用百分比。
jstat -gcnew pid 间隔时间(ms) 查看内存使用和young GC次数耗时。

jstack导出线程。
TDA分析线程dump。多个thread dump比对检查。


Mat使用简要笔记

1 heap dump
heap dump一般有如下信息:object,classes,gc roots,thread stacks,local variables.
A heap dump does not contain allocation information so it cannot resolve questions like who had created the objects

and where they have been created.

2 Retained set
Retained 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 sum of shallow sizes of all objects in the retained set of X, i.e. memory kept alive by X.

3 Dominator Tree
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.

4 gc root

5 The Leak Report

6 Thread

7 Analyzing Finalizer
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值