Closed ajohnson1 closed 2 years ago
The tags missing from the parser are:
3XMJAVALTHREAD
3XMTHREADCCL
3XMHEAPALLOC
Also 3XMCPUTIME
comes before 3XMTHREADBLOCK
. Has that always been true or does the parse need to cope with either order?
Currently it seems that OpenJ9 Java 17 is not generating a line:
3XMTHREADINFO2 (native stack address range from:0x00007F8B7318E000, to:0x00007F8B731CE000, size:0x40000)
though the parser should cope with that. I'll give some suggested code changes.
I see 3XMTHREADINFO2
in javacores from jdk17; which specific version and platform did you use that did not include that line?
The tag from my previous comment is actually 3XMJAVALTHRCCL
not 3XMTHREADCCL
The javacore is javacore.20220930.053619.81568.0001.txt created from Eclipse Memory Analyzer triggering a javacore from running jconsole.exe from 'JRE 17 Windows 11 amd64-64 (build 17.0.4.1+1)'
3XMTHREADINFO2
is only presented on platforms where omrthread_get_stack_range()
is supported; Windows is not one of those platforms, see omrthreadinspect.c.
Also
3XMCPUTIME
comes before3XMTHREADBLOCK
. Has that always been true or does the parse need to cope with either order?
Based on the history of javadump.cpp
, 3XMCPUTIME
has always come before 3XMTHREADBLOCK
, so reversing the two lines in ThreadSectionParser.processThreadandStackTrace()
to
IAttributeValueMap cpuTimes = processTagLineOptional(T_3XMCPUTIME);
IAttributeValueMap blockerInfo = processTagLineOptional(T_3XMTHREADBLOCK);
is all that is strictly necessary to fix this.
The DTFJ Javacore parser is meant to extract information from the javacore.xxxx.txt file generated by the JVM.
It works, but not as well as it used to as it does not extract Java and native stack traces from the javacore file. This is probably because the javacore file format has been enhanced with additional information, but this confuses the parser. Removing some of the extra lines from the javacore file lets DTFJ extract more information. The DTFJ parser should be improved to ignore those extra lines, or better still, make any additional information be available from DTFJ, while still being able to parse javacore files from older JVMs.
See https://github.com/eclipse-openj9/openj9/blob/52ab41fa82505d2b245129429bd419591b7d17d1/jcl/src/openj9.dtfj/share/classes/com/ibm/dtfj/javacore/parser/j9/section/thread/ThreadSectionParser.java#L155 which might get confused by
3XMHEAPALLOC
etc.Ideally we would review the current Javacore files and see what extra information could be extracted for DTFJ, as Eclipse Memory Analyzer can process PHD files with the associate Javacore and could use that information.