JDK-8157683 : Thread.onSpinWait intrinsification doesn't have sufficient test coverage
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-05-24
  • Updated: 2016-06-09
  • Resolved: 2016-05-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b122Fixed
Related Reports
Blocks :  
Description
hotspot/test/compiler/onSpinWait/TestOnSpinWait.java checks that Thread::onSpinWait is intrinsified on x86, we need tests which checks that  Thread::onSpinWait works fine on non-x86 platforms. there is a test proposed by [~psandoz]:

On Mar 29, 2016, at 10:40 AM, Paul Sandoz wrote: 
... 
We can add another test to the webrev e.g. TestOnSpinWaitBasic: 

// Test Thread.OnSpingWait can be called 
public class TestOnSpinWaitBasic { 

  public static void main(String[] args) { 
    for (int i = 0; i < 50_000; i++) { 
      java.lang.Thread.onSpinWait(); 
    } 
  } 
} 

And we can run that with the intrinsic enabled and disabled. 

Paul.