Using MAT ExportPROF in normal java application [message #1831680] |
Wed, 26 August 2020 13:30  |
Eclipse User |
|
|
|
Hi Team,
I am wondering if there is any way we can use the MAT ExportHPROF plugin functionality in our normal java application. We have a requirement that we need this functionality in our application to use the redact feature for our HPROF files. For this, if we use as a plugin it will open eclipse in runtime, but we want this as a normal java functionality. i.e. it should not open eclipse and just adding all the required jars and calling the functionality should give the desired output. Please let me know if there is any way like that. Any solution like that is much appreciated!
Thanks,
Santhoshi M
|
|
|
Re: Using MAT ExportHPROF in normal java application [message #1831802 is a reply to message #1831680] |
Sun, 30 August 2020 07:12  |
Eclipse User |
|
|
|
There is not a way to do that directly from the JVM as the JVM generates the heap dump. Eclipse Memory Analyzer is just operating on a file produced from a JVM - the original HPROF file is generated directly via the JVM using native code and Eclipse Memory Analyzer does not change how this happens.
Furthermore the Memory Analyzer export HPROF function actually operates on the internal MAT snapshot object which is the result of parsing the heap dump and converting it to the internal format. It doesn't operate directly on the HPROF file, but one benefit is that a user could redact an IBM system dump by parsing it with the DTFJ parser, then outputting it using the export HPROF.
There is a MAT report for export HPROF, so it can be called in batch mode.
ParseHeapDump.bat ..\..\java_pid0133.0001.hprof.gz -output=test.hprof org.eclipse.mat.hprof:export
You can supply other options:
-output=
-redact=
-map=
-skip=
-avoid=
|
|
|
Powered by
FUDForum. Page generated in 0.02905 seconds