RFR(XS): 7902477: JMH perfasm fails with lastest JDK 13
Nick Gasson
nick.gasson at arm.com
Fri Nov 1 01:58:57 UTC 2019
Hi Aleksey,
>>
>> Pattern.compile("^(\\S.*)( +)\\[(.+), (.+)[\\]\\[](.*)");
>
> Can you show the example output where the original regexp fails? Because I think you are adding
> another capture group here, which means the matcher indices at L850-751 below should be amended:
It's failing on this output, where the format changed in JDK 13 to add
the extra "-------"s.
- - - [BEGIN] - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
StubRoutines::updateBytesCRC32 [0x0000ffff6c819700, 0x0000ffff6c819870]
(368 bytes)
--------------------------------------------------------------------------------
0x0000ffff6c819700: stp x29, x30, [sp, #-16]!
0x0000ffff6c819704: mov x29, sp
0x0000ffff6c819708: mvn w0, w0
0x0000ffff6c81970c: subs x2, x2, #0x80
This parsing code is supposed to match the "StubRountines::..." line,
which it does, but it also matches the first line of the assembly output.
Unless I'm missing something the patch doesn't add an additional capture
group. It changes the previous initial capture group (.+) to (\\S.*) and
anchors it to the start of the line. Because otherwise it will match
like this:
( 0x0000ffff6c819700: stp x29, x30,)( )[(sp), (#-16)](!)
The exception then comes from trying to parse "sp" as a hex address.
Thanks,
Nick
More information about the jmh-dev
mailing list