RFR: JDK-8043630 Method os::yield_all() should be removed

David Holmes david.holmes at oracle.com
Thu May 22 12:07:17 UTC 2014


Hi Fred,

Generally good to see this go but a couple of queries.

src/share/vm/prims/jni.cpp

You changed yield_all to yield but on Solaris (actually posix) that 
still introduces the thread-state-transition so the ThreadInVMfromNative 
would still seem to be needed.

My memory is failing me here as I don't recall the details of the switch 
to using os::posix::sleep on Solaris. But I note that in doing so we 
have lost the semantics of sleep(0) that os::yield was relying on - we 
lost the thr_yield call!

src/share/vm/services/memTracker.hpp

Aside: I'm curious to know why NakedYield does not work as well on 
Windows - does it yield to the "wrong" thread?

Cheers,
David

On 22/05/2014 9:22 PM, frederic parain wrote:
> Please review the following change to remove
> the os::yield_all() method. This method has
> been source of issues for a long time and it's
> time to get rid of it.
>
> CR:
> https://bugs.openjdk.java.net/browse/JDK-8043630
>
> Webrev:
> http://cr.openjdk.java.net/~fparain/8043630/webrev.00/
>
> This changeset has been tested with JPRT (builds and
> tests), vm.quick.testlist, JDK jdk_core.
> I also ran refworkload benchmarks suite which didn't
> show any significant regression.
>
> Thanks,
>
> Fred
>


More information about the hotspot-runtime-dev mailing list