首页 > 系统相关 >【备忘】Eclipse内存泄漏分析工具MAT - Memory Analyzer Tools

【备忘】Eclipse内存泄漏分析工具MAT - Memory Analyzer Tools

时间:2022-10-18 14:36:21浏览次数:78  
标签:xxxx MAT Eclipse eclipse Analyzer org mat

下载

https://www.eclipse.org/mat/downloads.php

Linux上生成HeapDump

使用jdk的命令

/path/to/jdk/bin/jmap -dump:format=b, file=<文件名XX.hprof> <pid>

为MAT配置JDK11

MAT现在需要JAVA11,如果不希望改操作系统的JAVA_HOME等环境变量

下载JDK 11,解压,改名jre,放在MAT的文件夹内即可。

-vm
The location of Java Runtime Environment (JRE) to use to run the Eclipse platform. If not specified, the launcher will attempt to find a JRE. It will first look for a directory called jre as a >sibling of the Eclipse executable, and then look on the operating system path. Relative paths are interpreted relative to the directory that eclipse was started from.

-vm 运行Eclipse平台的JRE路径,如果没有定义,启动器会尝试查找。启动器首先会找可执行文件相同路径下的jre目录,然后从系统的path中查找。相对路径被解释为从Eclipse启动位置的相对目录。

文档地址:https://help.eclipse.org/latest/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm

使用MAT分析

./ParseHeapDump.sh <文件名pid>.hprof org.eclipse.mat.api:suspects org.eclipse.mat.api:overview org.eclipse.mat.api:top_components

生成 xxxx_Leak_Suspects.zip, xxxx_System_Overview.zip, xxxx_Top_components.zip

可下载到本地电脑

例子

解压后打开 xxxx_Leak_Suspects/index.html

图中的对应的JAVA进程没有发生内存泄露。

主页

  • 没有内存泄露
    Memory Analyzer Tools

Problem Suspect 2 -> StackTraces

  • 说明线程忙于从Kafka中poll数据。
    Memory Analyzer Tools

标签:xxxx,MAT,Eclipse,eclipse,Analyzer,org,mat
From: https://www.cnblogs.com/slankka/p/16802434.html

相关文章

  • Lucene.net(4.8.0) 学习问题记录二: 分词器Analyzer中的TokenStream和AttributeSource
    前言:目前自己在做使用Lucene.net和PanGu分词实现全文检索的工作,不过自己是把别人做好的项目进行迁移。因为项目整体要迁移到ASP.NETCore2.0版本,而Lucene使用的版本是3.6.......
  • LeetCode 54. Spiral Matrix
    ​​题目​​水题classSolution{public:vector<int>spiralOrder(vector<vector<int>>&matrix){inti=0,j=0;vector<int>ans;int......
  • String.format()的用法
    String.format()字符串常规类型格式化的两种重载方式format(Stringformat,Object…args)新字符串使用本地语言环境,制定字符串格式和参数生成格式化的新字符串。format......
  • MATLAB如何对矩阵进行求和?sum(A,1) sum(A,2)
    sum(A,1)对列中的连续元素进行操作,并返回每列总和的行向量。sum(A,2)对行中的连续元素进行操作,并返回每行总和的列向量。......
  • Eclipse使用技巧
    介绍各位使用Eclipse作为开发IDE的看客们,Eclipse的一些使用技巧您都知道吗?本文会介绍一些很实用的快捷键。快捷键Ctrl+Shift+L弹出快捷键说明进入或退出块选择模式Alt+Sh......
  • Eclipse插件推荐
    介绍本文介绍一些常用的Eclipse插件。​​http://repository.grepcode.com/java/ext-eclipse/​​​......
  • Eclipse新建类向导
    介绍Eclipse新建类的时候,是可以自动添加一个main方法的,这个是怎么做到的呢?我们可不可以修改这个向导,从而添加别的方法?使用过自动添加getter和setter方法的小盆友,想不想知道......
  • Eclipse中Tomcat插件的使用说明
    打开Tomcat视图通过菜单Window->ShowView->Other然后输入过滤项Servers,选择找到的内容然后点OK即可。添加web项目如果在打开的Tomcat视图中已经有一个实例,则右键菜单Addan......
  • Eclipse插件开发资源查找
    介绍我们在开发Eclipse插件的时候,需要查找类、接口等资源的时候,怎么办呢?本文介绍如何使用Eclipse自带的查找对话框来获取类路径。例子[codesyntaxlang="java"]/***http:......
  • Eclipse插件开发CleanUp
    扩展点[codesyntaxlang="python"]<extensionpoint="org.eclipse.jdt.ui.cleanUps"><cleanUpConfigurationUIclass="org.suren.cleanup.SuRenCleanUp"name="SuRenS......