RFR(XL): 8185640: Thread-local handshakes

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Wed Oct 18 14:00:26 UTC 2017

On 10/18/17 9:57 AM, Robbin Ehn wrote:
>> While thinking a little longer about the interpreter implementation, 
>> a new idea came into my mind.
>> I think we could significantly reduce impact on interpreter code size 
>> and performance by using safepoint polls only in a subset of 
>> bytecodes. E.g., we could use only bytecodes which perform any kind 
>> of jump by implementing something like
>> if (SafepointMechanism::uses_thread_local_poll() && 
>> t->does_dispatch()) generate_safepoint_poll();
>> in TemplateInterpreterGenerator::generate_and_dispatch.
> We have not seen any performance regression in simple benchmark with 
> this.
> I will do a better benchmark and compare what difference it makes. 

I think this is a good suggestion for a further RFE.  At one point, I'd 
only enabled safepoints for backward branches and returns in the 
safepoint table but it had no effect on performance, but since this 
generates code in dispatch_epilogue, it might help with code bloat.


More information about the hotspot-dev mailing list