JMH can't parse latest xperf output.
Jorn Vernee
jorn.vernee at oracle.com
Tue Oct 29 18:22:59 UTC 2019
Hi,
I've recently updated xperf (Windows profiler), and was getting a
StringIndexOutOfBounds exception when JMH was parsing event log lines.
After some debugging I found that the log lines that caused the crash
had commas in theirs symbols e.g.:
"SampledProfile, 13121554, java.exe (15096), 6284,
0x00000283d25f6f8c, 2, ucrtbase.dll!thread_start<unsigned int
(__cdecl*)(void *),1>, \"Unknown\"!0x00000283d25f6f8c, 1,
Unbatched"
Note that the current parser code tries to split these log lines on `,`
which breaks due to templates like: "thread_start<unsigned int
(__cdecl*)(void *),1>" since they contain a comma (This is of course a
great symbol format to use in log lines where the elements are also
separated by commas :D).
A quick-fix:
http://cr.openjdk.java.net/~jvernee/jmh_xperf/webrev.00/index.html
(JMH is not on JBS it seems?)
The fix uses the fact that the symbol format doesn't have any whitespace
after the comma, but the log line elements do. That fixes the exception
for me.
Can I offer this as a contribution? Should I do any additional testing?
Thanks,
Jorn
More information about the jmh-dev
mailing list