Time to Safepoint and HotSpot intrinsics

Andrew Haley aph at redhat.com
Fri Nov 30 16:26:10 UTC 2018

On 11/30/18 4:05 PM, Roland Westrelin wrote:
>> We could simply limit the maximum buffer size of the intrinsic and
>> wrap it in a Java loop with (as usual) a safepoint check. This does
>> not noticeably slow anything down, but it does solve the TTSP
>> problem. This can be important when multi-megabyte messages are being
>> encrypted.
> "a Java loop": so that would be implemented by changing the library
> code, not the JVM code?

Exactly, yes. We just wrap the (single) call site to the intrinsic
in an outer loop.

> Is the intend to have one safepoint per iteration of that loop? I think
> we would need to verify this interacts correctly with loop strip mining
> so that loop doesn't get strip mined if the body is something that's
> very long.

OK, that should be doable.

> As you say, sounds like a no brainer to me too.

Thanks for the reply.

Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the hotspot-dev mailing list