RFR (L) JDK-8230199: consolidate signature parsing code in HotSpot sources
Claes Redestad
claes.redestad at oracle.com
Mon Jan 27 13:20:42 UTC 2020
Hi Lois,
(not a full review :-))
from a performance perspective this looks ok:
Wall-clock timings are in the noise/neutral
There are small improvements on #instructions and #branches
There is a small increase of branch misses
I think some of the additional branch misses could be due worse inlining
in a few places, e.g., SignatureStream::skip_array_prefix and
Symbol::contains_byte_at are not inlineable here, and these include a
number of tests that might be redundant at some of the call sites. I
think this could be massaged a bit for optimal performance, but that
can surely be investigated as a follow-up.
Question: in signature.cpp, is there any tangible benefit to do this:
while (end < limit && (char)base[end++] == JVM_SIGNATURE_ARRAY) { }
--end; // skipped a non-'['
rather than:
while (end < limit && (char)base[end] == JVM_SIGNATURE_ARRAY) { end++; }
Thanks!
/Claes
On 2020-01-24 22:41, Lois Foltan wrote:
> Please review the following enhancement to consolidate signature parsing
> code in Hotspot sources. This change removes duplicate blocks of code
> that parse field or method signatures, provides a new Signature class to
> support basic signature queries on Symbol operands and enhances the
> SignatureStream class to parse field signatures in addition to methods.
>
> open webrev
> at:http://cr.openjdk.java.net/~lfoltan/bug_jdk8230199.0/webrev/
> <http://cr.openjdk.java.net/~lfoltan/bug_jdk8230199.0/webrev/>
> bug link: https://bugs.openjdk.java.net/browse/JDK-8230199
> contributed-by: Lois Foltan, John Rose
>
> Testing: hs-tier1-8, jdk-tier1-2
>
> Thanks,
> Lois
More information about the hotspot-runtime-dev
mailing list