SlideShare una empresa de Scribd logo
1 de 15
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

Más contenido relacionado

La actualidad más candente

CLTL presentation: training an opinion mining system from KAF files using CRF
CLTL presentation: training an opinion mining system from KAF files using CRFCLTL presentation: training an opinion mining system from KAF files using CRF
CLTL presentation: training an opinion mining system from KAF files using CRF
Rubén Izquierdo Beviá
 
28 to 29 detection
28 to 29 detection 28 to 29 detection
28 to 29 detection
myrajendra
 
RandomAccessFile Quick Start
RandomAccessFile Quick StartRandomAccessFile Quick Start
RandomAccessFile Quick Start
Guo Albert
 

La actualidad más candente (10)

CLTL presentation: training an opinion mining system from KAF files using CRF
CLTL presentation: training an opinion mining system from KAF files using CRFCLTL presentation: training an opinion mining system from KAF files using CRF
CLTL presentation: training an opinion mining system from KAF files using CRF
 
28 to 29 detection
28 to 29 detection 28 to 29 detection
28 to 29 detection
 
KafNafParserPy: a python library for parsing/creating KAF and NAF files
KafNafParserPy: a python library for parsing/creating KAF and NAF filesKafNafParserPy: a python library for parsing/creating KAF and NAF files
KafNafParserPy: a python library for parsing/creating KAF and NAF files
 
1 sample16c132 java-programming
1 sample16c132 java-programming1 sample16c132 java-programming
1 sample16c132 java-programming
 
Performance and predictability
Performance and predictabilityPerformance and predictability
Performance and predictability
 
A Big, Fast and Persistent Queue
A Big, Fast and Persistent QueueA Big, Fast and Persistent Queue
A Big, Fast and Persistent Queue
 
Sql Bits Sql Server Crash Dump Analysis
Sql Bits   Sql Server Crash Dump AnalysisSql Bits   Sql Server Crash Dump Analysis
Sql Bits Sql Server Crash Dump Analysis
 
Text Classification in Python – using Pandas, scikit-learn, IPython Notebook ...
Text Classification in Python – using Pandas, scikit-learn, IPython Notebook ...Text Classification in Python – using Pandas, scikit-learn, IPython Notebook ...
Text Classification in Python – using Pandas, scikit-learn, IPython Notebook ...
 
RandomAccessFile Quick Start
RandomAccessFile Quick StartRandomAccessFile Quick Start
RandomAccessFile Quick Start
 
Performance and predictability (1)
Performance and predictability (1)Performance and predictability (1)
Performance and predictability (1)
 

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

Dynamic Symbolic Database Application Testing
Dynamic Symbolic Database Application TestingDynamic Symbolic Database Application Testing

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

Analyzing .Net Application Memory Usage And Issues
Analyzing .Net Application Memory Usage And IssuesAnalyzing .Net Application Memory Usage And Issues
Analyzing .Net Application Memory Usage And Issues
 
The Concurrent Constraint Programming Research Programmes -- Redux
The Concurrent Constraint Programming Research Programmes -- ReduxThe Concurrent Constraint Programming Research Programmes -- Redux
The Concurrent Constraint Programming Research Programmes -- Redux
 
Large scale landuse classification of satellite imagery
Large scale landuse classification of satellite imageryLarge scale landuse classification of satellite imagery
Large scale landuse classification of satellite imagery
 
Using AI Planning to Automate the Performance Analysis of Simulators
Using AI Planning to Automate the Performance Analysis of SimulatorsUsing AI Planning to Automate the Performance Analysis of Simulators
Using AI Planning to Automate the Performance Analysis of Simulators
 
Shorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation SystemsShorten Device Boot Time for Automotive IVI and Navigation Systems
Shorten Device Boot Time for Automotive IVI and Navigation Systems
 
Ontologies Ontop Databases
Ontologies Ontop DatabasesOntologies Ontop Databases
Ontologies Ontop Databases
 
Performance Analysis of Idle Programs
Performance Analysis of Idle ProgramsPerformance Analysis of Idle Programs
Performance Analysis of Idle Programs
 
Stream data mining & CluStream framework
Stream data mining & CluStream frameworkStream data mining & CluStream framework
Stream data mining & CluStream framework
 
The Other HPC: High Productivity Computing
The Other HPC: High Productivity ComputingThe Other HPC: High Productivity Computing
The Other HPC: High Productivity Computing
 
Computation and Knowledge
Computation and KnowledgeComputation and Knowledge
Computation and Knowledge
 
PyData Paris 2015 - Closing keynote Francesc Alted
PyData Paris 2015 - Closing keynote Francesc AltedPyData Paris 2015 - Closing keynote Francesc Alted
PyData Paris 2015 - Closing keynote Francesc Alted
 
Sjug #26 ml is in java but is dl too - ver1.04 - tomasz sikora 2018-03-23
Sjug #26   ml is in java but is dl too - ver1.04 - tomasz sikora 2018-03-23Sjug #26   ml is in java but is dl too - ver1.04 - tomasz sikora 2018-03-23
Sjug #26 ml is in java but is dl too - ver1.04 - tomasz sikora 2018-03-23
 
Automatic and Interpretable Machine Learning with H2O and LIME
Automatic and Interpretable Machine Learning with H2O and LIMEAutomatic and Interpretable Machine Learning with H2O and LIME
Automatic and Interpretable Machine Learning with H2O and LIME
 
Plank
PlankPlank
Plank
 
Progressive Provenance Capture Through Re-computation
Progressive Provenance Capture Through Re-computationProgressive Provenance Capture Through Re-computation
Progressive Provenance Capture Through Re-computation
 
PL-4043, Accelerating OpenVL for Heterogeneous Platforms, by Gregor Miller
PL-4043, Accelerating OpenVL for Heterogeneous Platforms, by Gregor MillerPL-4043, Accelerating OpenVL for Heterogeneous Platforms, by Gregor Miller
PL-4043, Accelerating OpenVL for Heterogeneous Platforms, by Gregor Miller
 
Update on the Mont-Blanc Project for ARM-based HPC
Update on the Mont-Blanc Project for ARM-based HPCUpdate on the Mont-Blanc Project for ARM-based HPC
Update on the Mont-Blanc Project for ARM-based HPC
 
Gatling workshop lets test17
Gatling workshop lets test17Gatling workshop lets test17
Gatling workshop lets test17
 
Interactive Data Analysis for End Users on HN Science Cloud
Interactive Data Analysis for End Users on HN Science CloudInteractive Data Analysis for End Users on HN Science Cloud
Interactive Data Analysis for End Users on HN Science Cloud
 
Dynamic Symbolic Database Application Testing
Dynamic Symbolic Database Application TestingDynamic Symbolic Database Application Testing
Dynamic Symbolic Database Application Testing
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

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