Spin Loop Hint support: Draft JEP proposal

Alan Bateman Alan.Bateman at oracle.com
Mon Oct 5 09:04:22 UTC 2015


On 04/10/2015 17:22, Gil Tene wrote:
> I would like to circulate this draft JEP proposal for initial review and consensus building purposes.
>
> I'm cross-posting to both core-libs-dev and hotspot-dev. From a spec perspective, the main change it suggests is the addition of a method (and probably a class to hold it) to the core libraries. And intrinsifying implementations would involve changes in HotSpot (see prototype WebRev links included below).
>
> Draft JEP follows inline...
>
> — Gil.
>
I don't see any mention in the JEP about existing mechanisms to give 
hints to the runtime, as in @Contended (JEP 142) and 
@HotSpotIntrinsicCandidate (JDK-8076112). Just wondering if there is an 
alternative to explore where something like @Spinloop int ignore; would 
emit the PAUSE. This would at least give a starting point for usages in 
the JDK. The bigger question is whether to expose such runtime hints in 
an API. It's very much for the advanced developer and if an API is 
really needed then it might be something for a JDK-specific API.

-Alan



More information about the core-libs-dev mailing list