SlideShare a Scribd company logo
Distilling Heap Dumps:
a Guide to Using and Extending
Memory Analyzer
Krum Tsvetkov (SAP)
Andrew Johnson (IBM)
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 2
Memory Analyzer overview
 Works with heap dumps – post-mortem analysis
 UI and programmatic access to data in the heap dumps
 Automatic problem recognition
 Extendable
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 3
Demo
 Introduction to Memory Analyzer
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 4
Introduction to extending MAT
 Why extend MAT?
 To save time doing the same thing repeatedly
 To help others use the same technique as you
 To do things not possible from the GUI
 To build in application specific logic
 Examples
 Eclipse bundle explorer – shown as a tree (provided with MAT)
 JRuby (recent contribution to MAT)
 How to extend MAT
 MAT provides a set of Eclipse extension points
 User writes an extension plug-in
 MAT provides an API for reading the data from a dump
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 6
Name Resolver
 Used to give meaningful descriptions of objects
 Text result (similar to a toString())
 Useful for 'Group by Value' query
 Extension point: org.eclipse.mat.nameResolver
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 7
Implement a Name Resolver
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 8
Query
 Used for exploring dumps or detailed analysis
 May interact with existing queries (context menus)
 Integrated into MAT’s menus
 Extension point: org.eclipse.mat.api.query
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 9
Implement a Query
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 12
Results from a Query
IResult
ObjectList(atree)
ListResul(atable)
Compositionofresults
inHTML
Histogr(atable)
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 13
Using a Predefined Result
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 20
Request Resolver
 Used to identify what a
thread was doing
 Appears in the leak suspects
report
 Extension point -
org.eclipse.mat.api.requestResolver
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 21
Implement a Request Resolver
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 22
Other extension points
 Reports - org.eclipse.mat.report.report
 HTML results of queries – also used for batch mode
 Thread resolver – additional thread data such as native stacks
 Ticket resolver – can identify appropriate routing for problem
 Based on classes and classloaders of problem objects
 Rendering – org.eclipse.mat.api.renderer
 Additional to HTML and CSV
 Trigger heap dump – org.eclipse.mat.api.heapDumpProvider
 For new VM types
 Parser – for new dump types and VMs, such as for Jikes RVM
 Snapshot factory – org.eclipse.mat.api.factory
 Unlikely to use this as replaces whole snapshot
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 23
In Summary, MAT Offers …
 Helpful memory analysis features out-of-the-box
 API for extracting data
 Application specific analysis can be added as extensions
Distilling Heap Dumps: a Guide to
Using and Extending Memory
Analyzer
Krum Tsvetkov, Andrew Johnson 24
Thank You!
 Memory Analyzer @ Eclipse:
http://www.eclipse.org/mat
 Wiki page for extending Memory Analyzer:
http://wiki.eclipse.org/MemoryAnalyzer/Extending_Memory_Analyzer
 Forum:
http://www.eclipse.org/forums/eclipse.memory-analyzer
 Blogs:
http://dev.eclipse.org/blogs/memoryanalyzer

More Related Content

PDF
Docker Container
PDF
Kubernetes 101
PDF
OpenShift-Technical-Overview.pdf
PDF
Managing dependencies with gradle
ODP
¿Qué es docker?
PDF
Introducción a Docker
PPTX
Deploying and managing IBM MQ in the Cloud
PDF
Kubernetes - A Comprehensive Overview
Docker Container
Kubernetes 101
OpenShift-Technical-Overview.pdf
Managing dependencies with gradle
¿Qué es docker?
Introducción a Docker
Deploying and managing IBM MQ in the Cloud
Kubernetes - A Comprehensive Overview

What's hot (20)

ODP
An Introduction To Jenkins
PDF
Testing The Effectiveness Of AppArmor
ODP
Openshift Container Platform
PPTX
Message Broker System and RabbitMQ
PPTX
Introducción a los contenedores Docker
PPTX
Deployment model Canary deployment
PDF
VMware on AWS를 통한 하이브리드 클라우드 구축 적용 - 홍정진, AWS Partner SA/ VMC on AWS
PDF
IT Automation with Ansible
PDF
Kubernetes
PPTX
K8s security best practices
PDF
멀티·하이브리드 클라우드 구축 전략 - 네이버비즈니스플랫폼 박기은 CTO
PDF
Introduction to Kubernetes with demo
PPTX
OpenStack Quantum Intro (OS Meetup 3-26-12)
PDF
Open shift 4 infra deep dive
PDF
[OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?
PPTX
Docker presentation
PPTX
Tackle-test: An Automatic Unit-level Test Case Generator
PDF
EKS Workshop
PDF
Kubernetes - introduction
PDF
IBM MQ - High Availability and Disaster Recovery
An Introduction To Jenkins
Testing The Effectiveness Of AppArmor
Openshift Container Platform
Message Broker System and RabbitMQ
Introducción a los contenedores Docker
Deployment model Canary deployment
VMware on AWS를 통한 하이브리드 클라우드 구축 적용 - 홍정진, AWS Partner SA/ VMC on AWS
IT Automation with Ansible
Kubernetes
K8s security best practices
멀티·하이브리드 클라우드 구축 전략 - 네이버비즈니스플랫폼 박기은 CTO
Introduction to Kubernetes with demo
OpenStack Quantum Intro (OS Meetup 3-26-12)
Open shift 4 infra deep dive
[OpenStack Days Korea 2016] Track1 - 카카오는 오픈스택 기반으로 어떻게 5000VM을 운영하고 있을까?
Docker presentation
Tackle-test: An Automatic Unit-level Test Case Generator
EKS Workshop
Kubernetes - introduction
IBM MQ - High Availability and Disaster Recovery
Ad

Similar to Distilling Dumps: a Guide to Using and Extending Memory Analyzer (20)

PPT
Using and Extending Memory Analyzer into Uncharted Waters
PPTX
EclipseMAT
PDF
Take advantage of memory analyzer tool inside your continuous integration
PDF
Take advantage of memory analyzer tool inside your continuous integration
PDF
Debugging Java from Dumps
PPT
Eclipse Memory Analyzer - More Than Just a Heap Walker
PPT
Eclipse Memory Analyzer
PDF
Ps ts 4118-304118_230-1_fin_v1
PPT
Practical lessons in memory analysis
ODP
Windows Debugging Tools - JavaOne 2013
PPTX
Exploring Java Heap Dumps (Oracle Code One 2018)
PPTX
Heap Dump Analysis - AEM: Real World Issues
PDF
Hp java heap dump analysis Workshop
PPT
Javaforum looking into the memory
PPTX
Mule memory leak issue
PPT
The Right Pill for JRuby Memory and Thread Issues: Eclipse Memory Analyzer
PPTX
Memory Analyzer Tool (MAT)
PDF
JavaOne 2014: Java Debugging
PDF
WebSphere Technical University: Introduction to the Java Diagnostic Tools
PDF
Tools and Tips to Diagnose Performance Issues
Using and Extending Memory Analyzer into Uncharted Waters
EclipseMAT
Take advantage of memory analyzer tool inside your continuous integration
Take advantage of memory analyzer tool inside your continuous integration
Debugging Java from Dumps
Eclipse Memory Analyzer - More Than Just a Heap Walker
Eclipse Memory Analyzer
Ps ts 4118-304118_230-1_fin_v1
Practical lessons in memory analysis
Windows Debugging Tools - JavaOne 2013
Exploring Java Heap Dumps (Oracle Code One 2018)
Heap Dump Analysis - AEM: Real World Issues
Hp java heap dump analysis Workshop
Javaforum looking into the memory
Mule memory leak issue
The Right Pill for JRuby Memory and Thread Issues: Eclipse Memory Analyzer
Memory Analyzer Tool (MAT)
JavaOne 2014: Java Debugging
WebSphere Technical University: Introduction to the Java Diagnostic Tools
Tools and Tips to Diagnose Performance Issues
Ad

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
cuic standard and advanced reporting.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Machine Learning_overview_presentation.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Encapsulation theory and applications.pdf
PDF
Machine learning based COVID-19 study performance prediction
Teaching material agriculture food technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Big Data Technologies - Introduction.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
cuic standard and advanced reporting.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Assigned Numbers - 2025 - Bluetooth® Document
Unlocking AI with Model Context Protocol (MCP)
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
20250228 LYD VKU AI Blended-Learning.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Machine Learning_overview_presentation.pptx
A comparative analysis of optical character recognition models for extracting...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Spectral efficient network and resource selection model in 5G networks
Encapsulation theory and applications.pdf
Machine learning based COVID-19 study performance prediction

Distilling Dumps: a Guide to Using and Extending Memory Analyzer

  • 1. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov (SAP) Andrew Johnson (IBM)
  • 2. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 2 Memory Analyzer overview  Works with heap dumps – post-mortem analysis  UI and programmatic access to data in the heap dumps  Automatic problem recognition  Extendable
  • 3. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 3 Demo  Introduction to Memory Analyzer
  • 4. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 4 Introduction to extending MAT  Why extend MAT?  To save time doing the same thing repeatedly  To help others use the same technique as you  To do things not possible from the GUI  To build in application specific logic  Examples  Eclipse bundle explorer – shown as a tree (provided with MAT)  JRuby (recent contribution to MAT)  How to extend MAT  MAT provides a set of Eclipse extension points  User writes an extension plug-in  MAT provides an API for reading the data from a dump
  • 5. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 6 Name Resolver  Used to give meaningful descriptions of objects  Text result (similar to a toString())  Useful for 'Group by Value' query  Extension point: org.eclipse.mat.nameResolver
  • 6. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 7 Implement a Name Resolver
  • 7. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 8 Query  Used for exploring dumps or detailed analysis  May interact with existing queries (context menus)  Integrated into MAT’s menus  Extension point: org.eclipse.mat.api.query
  • 8. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 9 Implement a Query
  • 9. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 12 Results from a Query IResult ObjectList(atree) ListResul(atable) Compositionofresults inHTML Histogr(atable)
  • 10. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 13 Using a Predefined Result
  • 11. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 20 Request Resolver  Used to identify what a thread was doing  Appears in the leak suspects report  Extension point - org.eclipse.mat.api.requestResolver
  • 12. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 21 Implement a Request Resolver
  • 13. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 22 Other extension points  Reports - org.eclipse.mat.report.report  HTML results of queries – also used for batch mode  Thread resolver – additional thread data such as native stacks  Ticket resolver – can identify appropriate routing for problem  Based on classes and classloaders of problem objects  Rendering – org.eclipse.mat.api.renderer  Additional to HTML and CSV  Trigger heap dump – org.eclipse.mat.api.heapDumpProvider  For new VM types  Parser – for new dump types and VMs, such as for Jikes RVM  Snapshot factory – org.eclipse.mat.api.factory  Unlikely to use this as replaces whole snapshot
  • 14. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 23 In Summary, MAT Offers …  Helpful memory analysis features out-of-the-box  API for extracting data  Application specific analysis can be added as extensions
  • 15. Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer Krum Tsvetkov, Andrew Johnson 24 Thank You!  Memory Analyzer @ Eclipse: http://www.eclipse.org/mat  Wiki page for extending Memory Analyzer: http://wiki.eclipse.org/MemoryAnalyzer/Extending_Memory_Analyzer  Forum: http://www.eclipse.org/forums/eclipse.memory-analyzer  Blogs: http://dev.eclipse.org/blogs/memoryanalyzer