Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8157683

Thread.onSpinWait intrinsification doesn't have sufficient test coverage

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b122

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              psandoz Paul Sandoz
              Reporter:
              iignatyev Igor Ignatyev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: