Print this page
rev 3754 : 7189971: Implement CMSWaitDuration for non-incremental mode of CMS
Summary: In the incremental mode of CMS the CMSWaitDuration delays the iCMS cycle until after a scavenge. Implement the same for the non-incremental mode.
Reviewed-by:
Contributed-by: Michal Frajt <michal@frajt.eu>

Split Close
Expand all
Collapse all
          --- old/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp
          +++ new/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp
↓ open down ↓ 127 lines elided ↑ open up ↑
 128  128    static bool cms_thread_has_cms_token() {
 129  129      return CMS_flag_is_set(CMS_cms_has_token);
 130  130    }
 131  131    static bool vm_thread_wants_cms_token() {
 132  132      return CMS_flag_is_set(CMS_vm_wants_token);
 133  133    }
 134  134    static bool cms_thread_wants_cms_token() {
 135  135      return CMS_flag_is_set(CMS_cms_wants_token);
 136  136    }
 137  137  
 138      -  // Wait on CMS lock until the next synchronous GC
      138 +  // Wait on CMS lock until the next event
 139  139    // or given timeout, whichever is earlier. A timeout value
 140  140    // of 0 indicates that there is no upper bound on the wait time.
 141  141    // A concurrent full gc request terminates the wait.
 142  142    void wait_on_cms_lock(long t_millis);
 143  143  
      144 +  // Wait on CMS lock until the next synchronous GC
      145 +  // or given timeout, whichever is earlier. A timeout value
      146 +  // of 0 indicates that there is no upper bound on the wait time.
      147 +  // A concurrent full gc request terminates the wait.
      148 +  void wait_on_cms_lock_for_scavenge(long t_millis);
      149 +
 144  150    // The CMS thread will yield during the work portion of its cycle
 145  151    // only when requested to.  Both synchronous and asychronous requests
 146  152    // are provided:
 147  153    // (1) A synchronous request is used for young gen collections and
 148  154    //     for direct allocations.  The requesting thread increments
 149  155    //     _pending_yields at the beginning of an operation, and decrements
 150  156    //     _pending_yields when that operation is completed.
 151  157    //     In turn, the CMS thread yields when _pending_yields is positive,
 152  158    //     and continues to yield until the value reverts to 0.
 153  159    // (2) An asynchronous request, on the other hand, is used by iCMS
↓ open down ↓ 133 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX