Print this page
rev 4518 : 8013934: Garbage collection event for CMS has wrong cause for System.gc()
Reviewed-by: brutisso, jwilhelm

Split Split Close
Expand all
Collapse all
          --- old/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp
          +++ new/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp
↓ open down ↓ 233 lines elided ↑ open up ↑
 234  234    MutexLockerEx x(FullGCCount_lock, Mutex::_no_safepoint_check_flag);
 235  235    assert(_full_gc_count_before <= gch->total_full_collections(), "Error");
 236  236    if (gch->total_full_collections() == _full_gc_count_before) {
 237  237      // Disable iCMS until the full collection is done, and
 238  238      // remember that we did so.
 239  239      CMSCollector::disable_icms();
 240  240      _disabled_icms = true;
 241  241      // In case CMS thread was in icms_wait(), wake it up.
 242  242      CMSCollector::start_icms();
 243  243      // Nudge the CMS thread to start a concurrent collection.
 244      -    CMSCollector::request_full_gc(_full_gc_count_before);
      244 +    CMSCollector::request_full_gc(_full_gc_count_before, _gc_cause);
 245  245    } else {
 246  246      assert(_full_gc_count_before < gch->total_full_collections(), "Error");
 247  247      FullGCCount_lock->notify_all();  // Inform the Java thread its work is done
 248  248    }
 249  249  }
 250  250  
 251  251  bool VM_GenCollectFullConcurrent::evaluate_at_safepoint() const {
 252  252    Thread* thr = Thread::current();
 253  253    assert(thr != NULL, "Unexpected tid");
 254  254    if (!thr->is_Java_thread()) {
↓ open down ↓ 56 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX