Time to Safepoint and HotSpot intrinsics

Andrew Haley aph at redhat.com
Fri Nov 30 16:39:02 UTC 2018


On 11/30/18 2:28 PM, Hohensee, Paul wrote:
> My bad on the definition of "intrinsic".
> 
> I was thinking of "intrinsic" as a method for which C2 generates specialized IR which would then be subject to optimization (as in library_call.cpp), not hand-coded asm (as in stubGenerator_aarch64.cpp).

It's very much the latter.

> I don't know how feasible it is to switch from the latter to the former, but imo it would be good to do if we could.

Pretty near impossible for the crypto stuff, which relies on magic
hand-unrolled software pipelining for maximum performance.

> On the maximum time an intrinsic should block, Roland pointed at https://bugs.openjdk.java.net/browse/JDK-8186027. Maybe use the same approach for hand-coded asm, i.e, insert safepoint polls into the hand-coded asm based on LoopStripMiningIter.

It'd be hard. We'd need to generate oop maps in the middle of the intrinsics.

> Or, are the intrinsics completely separate native methods? If so, your approach sounds good to me.
They just call out to the stubs. As a matter of maintainability I
believe we should do as much as possible in Java rather than add
even more hand-coded stuff. Apart from anything else it'd mean that
we wouldn't have to fix this in N different back ends.

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