Spin Loop Hint support: Draft JEP proposal (original) (raw)

Aleksey Shipilev aleksey.shipilev at oracle.com
Mon Oct 5 08:56:39 UTC 2015


Hi Gil,

Glad to see this being addressed!

On 10/04/2015 07:22 PM, Gil Tene wrote:

We propose to add a method to the JDK which would be hint that a spin loop is being performed. E.g. jdk.util.PerformanceHints.spinLoopHint(), which will hopefully evolve to a Java SE API, e.g. java.util.PerformanceHints.spinLoopHint(). The specific name space location, class name, and method name will be determined as part of development of this JEP.

Yes, that would be a tough part. JDK is usually oblivious of these low-level platform-specific hints, they go to sun.misc.* (e.g. Unsafe, @Contended and others...). I'll let Project Leads to make that call :)

[4] HotSpot WebRevs for prototype implementation which intrinsifies org.performancehintsSpinHint.spinLoopHint() http://ivankrylov.github.io/spinloophint/webrev/ <http://ivankrylov.github.io/spinloophint/webrev/>

Thanks, -Aleksey



More information about the core-libs-dev mailing list