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

Simplify use of G1StressConcRegionFreeingDelayMillis

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • tbd
    • 9
    • hotspot
    • gc
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved: