Driver Application for Qualification - End Dumps | Side Dumps
Distilling Dumps: a Guide to Using and Extending Memory Analyzer
-
Upload
ajohnson1 -
Category
Technology
-
view
9.862 -
download
1
description
Transcript of Distilling Dumps: a Guide to Using and Extending Memory Analyzer
![Page 1: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/1.jpg)
Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer
Krum Tsvetkov (SAP)
Andrew Johnson (IBM)
![Page 2: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/2.jpg)
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
![Page 3: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/3.jpg)
Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer
Krum Tsvetkov, Andrew Johnson 3
Demo
Introduction to Memory Analyzer
![Page 4: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/4.jpg)
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
![Page 5: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/5.jpg)
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
![Page 6: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/6.jpg)
Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer
Krum Tsvetkov, Andrew Johnson 7
Implement a Name Resolver
![Page 7: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/7.jpg)
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
![Page 8: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/8.jpg)
Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer
Krum Tsvetkov, Andrew Johnson 9
Implement a Query
![Page 9: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/9.jpg)
Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer
Krum Tsvetkov, Andrew Johnson 12
Results from a Query
IResult
ObjectList
(a
tree
)
ListResult
(a
tabl
e)
Com
posi
tion
of
resu
lts in
HT
ML
Histogram
(a
tabl
e)
![Page 10: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/10.jpg)
Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer
Krum Tsvetkov, Andrew Johnson 13
Using a Predefined Result
![Page 11: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/11.jpg)
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
![Page 12: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/12.jpg)
Distilling Heap Dumps: a Guide to Using and Extending Memory Analyzer
Krum Tsvetkov, Andrew Johnson 21
Implement a Request Resolver
![Page 13: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/13.jpg)
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
![Page 14: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/14.jpg)
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
![Page 15: Distilling Dumps: a Guide to Using and Extending Memory Analyzer](https://reader034.fdocuments.us/reader034/viewer/2022051610/54833f02b07959520c8b49e5/html5/thumbnails/15.jpg)
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