第23课:使用MAT对Dump文件进行分析实战
/* 王家林老师授课http://weibo.com/ilovepains 每天晚上20:00YY频道现场授课频道68917580*/
1 导出Dump文件 2 使用MAT对Dump文件进行分析实战
一:下载安装mat www.eclipse.org/mat/downloads.php
解压缩到G:\IMFBigDataSpark2016\mat
点击MemoryAnalyzer.exe即可运行
二:分析oom,我们模拟代码运行 com.dt.spark.jvm.basics 新建OOMMAT
OOMMAT
package com.dt.spark.jvm.basics;
public class OOMMAT {
public static void main(String[] args) {
final int size = 512 *1024 *1024 ;
byte [] array1 =new byte [size];
byte [] array2 =new byte [size];
byte [] array3 =new byte [size];
byte [] array4 =new byte [size];
byte [] array5