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

Simplify use of G1StressConcRegionFreeingDelayMillis

    Details

    • Subcomponent:
      gc
    • CPU:
      generic
    • OS:
      generic

      Description

      There is presently one use of G1StressConcRegionFreeingDelayMillis, in g1/concurrentMark.cpp:

      #ifndef PRODUCT
            if (G1StressConcRegionFreeing) {
              for (uintx i = 0; i < G1StressConcRegionFreeingDelayMillis; ++i) {
                os::sleep(Thread::current(), (jlong) 1, false);
              }
            }
      #endif

      Why isn't this just

            if (G1StressConcRegionFreeing &&
                G1StressConcRegionFreeingDelayMillis > 0) {
              os::sleep(Thread::current(),
                             G1StressConcRegionFreeingDelayMillis,
                             false);
            }

      or maybe even "true" for the third argument to sleep, to allow it to be interruptable.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                kbarrett Kim Barrett
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: