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

RTM tests that assert on non-zero lock statistics are too strict in RTMTotalCountIncrRate > 1 cases

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b48
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Following RTM tests assert that PrintPreciseRTMLockingStatistics output should contain non-zero locks count:

        compiler/rtm/locking/TestRTMTotalCountIncrRate.java
        compiler/rtm/print/TestPrintPreciseRTMLockingStatistics.java

        However, both tests use either default RTMTotalCountIncrRate value (64) or value greater than 1 and as a result locks count is incremented only when (rdtsc() & (value - 1) == 0).
        There is a chance that such TSC values won't be observed during the test run. In such cases tests listed above will fail.

        Fix is pretty simple: relax assertions and verify that amount of lock attempts it non-negative.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                fzhinkin Filipp Zhinkin
                Reporter:
                fzhinkin Filipp Zhinkin
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Due:
                  Created:
                  Updated:
                  Resolved: