I am trying to add Java memory profiling into my devops pipeline. I am using Eclipse MAT command line script for this purpose. Once I provide the hprof file as input to this and it generates suspect report. I need to parse this HTML report and make decision based on this. This is cumbersome and also the parsing is not structured. I want either XML/JSON report or I want to see how the actual report is generated by Eclipse MAT. If I found that I can get the code and customize based on my need. Any suggestions on this.
How to get Eclipse MAT memory leak suspect report in JSON/XML format?
544 views Asked by JavaUser At
2
There are 2 answers
0
AnEmortalKid
On
Another option is to implement your own extension: https://wiki.eclipse.org/MemoryAnalyzer/Extending_Memory_Analyzer#Calling_One_Query_from_Another and call the leak_hunter query. Then read through the details of the IResult and transform those to a json object.
Related Questions in GARBAGE-COLLECTION
- Java SoftReference: Soft references were not collected before the occurrence of OOM
- Would event listeners prevent garbage collecting objects referenced in outer function scopes?
- How to prevent R from slowing down in long analysis besides freeing up memory?
- change GC in quarkus jib build docker container
- What is 'MarkDependentCodeForDeoptimization()' used for in V8's Mark-Compact phase?
- Is my closure in an expressjs middlware causing a memory leak?
- Why do different delivery methods have different results when applying PHP's global keyword?
- Comment optimiser l'utilisation des resources mémoires (RAM) sur flutter?
- The way Elasticsearch deals with control heap memory when indexing documents
- Is it possible for a .net core app run 2 different GC modes at the same time?
- Why do we need the finalizer in the disposable pattern if it is not guaranteed that it will be called by the garbage collector?
- Out of memory in clojure - Nested reduce on Lazy Sequence
- Why does process memory grow in .Net, but managed heap size does not change?
- What is wrong with this Reflection.Emit for value conversion delegates?
- Python, How to stop tkinter variables from being garbage-collected?
Related Questions in HEAP-DUMP
- OOM (Java heap) error due to org.postgresql.core.Field
- How to check the memory leak from the given retained path which contains webviewNode in the Electron app
- Java process mem is less as compared to shown in grafana
- Chronicle Queue Heap memory issue
- How to open heap dump in netbeans 20
- Unexpected call to Finalizer::register
- Java Memory leak: Java.lang.ref.finalizer object
- JBOSS service getting hanged on production server
- Out of memory issues within Matillion
- Profilers not able to take heap/thread dump
- How to Identify what threads are in Queue via Java Heap Dump
- Opening and reading a heapdump file not working on IntelliJ
- Generate Java heap dump programmatically on AIX
- How can I extract raw byte arrays stored in Map<?, byte[]> objects from a Java heap dump?
- Eclipse memory analyzer Heap dump analysis
Related Questions in MEMORY-PROFILING
- memory_profiler plot process id/name
- Does AndroidStudio memory profiler show a PssTotal data?
- .net Application different behaviour when being launched on PC and as a kubernetes pod
- Is the amount of memory displayed in the Android profiler the same as what getTotalPss() of the Debug.MemoryInfo class returns at a specific instance?
- What happens to the memory allocated on my local variable
- Why number of processor cycles required to process a single array element grows with the working set (array) size?
- Memory usage of sparse matrices (scipy)
- How to calculate Retained size (in bytes) of Dictionary<TKey,TValue> in memory dump, using WinDbg?
- How do I get the results of memor_usage in the form of a dictionary?
- does valgrind support profiling SYCL applications
- What does Scalene profiler tools "peak" memory mean?
- Python: memory leak with memory_profiler
- Memory profiling in Visual Studio empty result set
- JProfiler: how to display surviving generations aka generations count?
- Heap profiling with gperftools and Rcpp: Failing to link against tcmalloc
Related Questions in HPROF
- Intellij Profiler - read/copy/save value
- JVM heap dump without trace information: "Unresolved Name"
- Parsing hprof memory dump
- React Native: .hprof file exceeds GitHub's 100MB file size limit
- Java - Automated CPU / Memory sampling - alternative to HPROF
- How to get Eclipse MAT memory leak suspect report in JSON/XML format?
- Java Could not find agent library hprof on the library path
- What is the difference between android and standard hprof file?
- How to run hprof on mac
- jhat -baseline feature does not work with HeapDumpOnOutOfMemoryError and jcmd GC.heap_dump generated baseline
- Extract JVM uptime from binary heap dump
- Loading objects from .hprof file back into Java program
- react-native: File android/java_pid14920.hprof is 311.59 MB; this exceeds GitHub's file size limit
- Where is the heap dump file created by jcmd?
- Where do references to Java Objects really exist?
Related Questions in ECLIPSE-MAT
- Memory leak through UnmarshallingContext
- Java Memory leak: Java.lang.ref.finalizer object
- Failed to load p2 metadata repository from location https://download.eclipse.org/eclipse/updates/4.30
- How to convert LocalDateTime to human readable string in OQL
- Using eclipse Memory Analyzer(MAT) in batch mode and stuck at a subtask
- How to understand this eclipse MAT data?
- How to find references to unreachable_objects via heap file?
- Eclipse Memory Analyzer - Incompatible JVM
- Java heap dump - why so much memory is taken by Gradle
- Eclipse MAT report is only listing top 10 objects
- Java Memory issue : Java.lang.ref.finalizer object
- How to get Eclipse MAT memory leak suspect report in JSON/XML format?
- HEAP DUMP too big to open in Eclipse MAT
- org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
- Out-of-memory : Metaspace
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Eclipse Memory Analyzer is open source, and all the code is here: https://git.eclipse.org/c/mat/org.eclipse.mat.git
The leak suspects code is in https://git.eclipse.org/c/mat/org.eclipse.mat.git/tree/plugins/org.eclipse.mat.api/src/org/eclipse/mat/inspections/FindLeaksQuery.java and https://git.eclipse.org/c/mat/org.eclipse.mat.git/tree/plugins/org.eclipse.mat.api/src/org/eclipse/mat/inspections/LeakHunterQuery.java
The leak suspects report is clean HTML which passes HTML validation, which would aid parsing.
Your request for a XML/JSON report is a reasonable one, but is not currently provided by MAT. There is provision for one to be added, using the rendering extension point http://help.eclipse.org/latest/topic/org.eclipse.mat.ui.help/doc/org_eclipse_mat_report_renderer.html . There are already HTML, CSV and TXT renderers and so a JSON extension point could be added. There are then design decisions to be made about how to represent trees and tables in JSON, and how to convert HTML from say the yellow boxes of the leak suspects report to JSON.
As I know of other people who want a JSON formatted report it may be worthwhile following it up more formally with the MAT community, either on the forum https://www.eclipse.org/forums/index.php?t=thread&frm_id=186 or on Bugzilla or on the developer mailing list if you are proposing to help write code.