Intrinsify currentThread()

Andrew Haley aph at redhat.com
Tue Jul 28 15:47:03 UTC 2020


On 28/07/2020 15:41, Alan Bateman wrote:
> Great! I see some of the stress tests in
> test/jdk/java/lang/Thread/virtual/stress are failing, it looks like
> anything that uses parkNanos.

Oh! I didn't see those. Sorry, I don't know why I didn't. Will fix.

> Adding @ChangesCurrentThread to VT
> scheduleUnpark and cancel should fix it. Also is it strictly needed on
> runContinuation, is it because mount/unmount get inlined?

It's purely for performance. If runContinuation is not marked
@ChangesCurrentThread, mount/unmount cannot be inlined within it.

> In passing, I wonder if the existing currentThread0 should be renamed as
> it may be confusing to have two intrinsics with similar names.

Fair comment. I have to admit that I got very confused with the naming
while I was doing this.

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



More information about the loom-dev mailing list