RFR (L) JDK-8230199: consolidate signature parsing code in HotSpot sources

Lois Foltan lois.foltan at oracle.com
Mon Jan 27 18:27:50 UTC 2020


On 1/27/2020 8:20 AM, Claes Redestad wrote:
> 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.

Thank you Claes for running performance tests against this webrev! I 
agree that we can look at a follow up RFE for inlining those methods.

>
>
> 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++; }

I will fix that in signature.cpp, your suggested change is much 
clearer.  There is no tangible benefit from doing it the first way.

Thanks,
Lois

>
> 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