Time to Safepoint and HotSpot intrinsics
hohensee at amazon.com
Tue Dec 4 21:17:50 UTC 2018
I don't think it's all that difficult to generate oopmaps in asm code. See, e.g., generate_uncommon_trap_blob() in sharedRuntime_x86_64.cpp. But, I agree that we should do as much as we can in Java, so if we're ok with coarse-grained strip-mining, put the strip-mine loop in Java.
On 11/30/18, 8:39 AM, "Andrew Haley" <aph at redhat.com> wrote:
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.
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