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

Thread.onSpinWait intrinsification doesn't have sufficient test coverage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • b122

      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.

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

              Created:
              Updated:
              Resolved: