RFR(XL): 8185640: Thread-local handshakes
martin.doerr at sap.com
Wed Oct 25 20:23:49 UTC 2017
as far as I can see tableswitch, fast_linearswitch and fast_binaryswitch should get the poll.
lookupswitch gets rewritten to fast_linearswitch or fast_binaryswitch.
Sorry that my proposal created extra work for you. Thanks for doing it.
From: Robbin Ehn [mailto:robbin.ehn at oracle.com]
Sent: Mittwoch, 25. Oktober 2017 21:53
To: Doerr, Martin <martin.doerr at sap.com>; Andrew Haley <aph at redhat.com>; Karen Kinnear <karen.kinnear at oracle.com>
Cc: hotspot-dev developers <hotspot-dev at openjdk.java.net>
Subject: Re: RFR(XL): 8185640: Thread-local handshakes
First thanks both for reviewing this!
On 2017-10-25 21:38, Doerr, Martin wrote:
> Hi Andrew,
> I think you're right.
> A Java program could have a goto in one of the cases of any switch which gets optimized out (by javac) replacing the branch target of the case.
> So I think we need safepoint polls in all switch templates, too.
That's lookupswitch and binaryswitch also?
> Best regards,
> -----Original Message-----
> From: Andrew Haley [mailto:aph at redhat.com]
> Sent: Mittwoch, 25. Oktober 2017 17:17
> To: Robbin Ehn <robbin.ehn at oracle.com>; Karen Kinnear <karen.kinnear at oracle.com>; Doerr, Martin <martin.doerr at sap.com>
> Cc: hotspot-dev developers <hotspot-dev at openjdk.java.net>
> Subject: Re: RFR(XL): 8185640: Thread-local handshakes
> On 24/10/17 15:54, Robbin Ehn wrote:
>> I did a fix for the interpreter performance regression, it's plain and simple, I
>> kept the polling code inside dispatch_base but made it optional as the verify oop.
>> Manual tested with jstack and it passes: hotspot_tier1, hotspot_handshake
>> It reduces the polling cost of 80%, sensitive benchmarks shows -0.44% regression
>> vs TLH off. More insensitive benchmark show no regression.
> I think it's not quite right: you're missing a check in tableswitch
> and fast_linearswitch. These can be used to construct loops.
More information about the hotspot-dev