src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp

changeset 3218
db89aa49298f
parent 3208
ec4b032a4977
child 3295
00dd86e542eb
     1.1 --- a/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp	Fri Oct 21 12:42:42 2011 -0400
     1.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp	Thu Oct 20 12:06:20 2011 -0700
     1.3 @@ -147,12 +147,8 @@
     1.4            }
     1.5          }
     1.6        } while (cm()->restart_for_overflow());
     1.7 +
     1.8        double counting_start_time = os::elapsedVTime();
     1.9 -
    1.10 -      // YSR: These look dubious (i.e. redundant) !!! FIX ME
    1.11 -      slt()->manipulatePLL(SurrogateLockerThread::acquirePLL);
    1.12 -      slt()->manipulatePLL(SurrogateLockerThread::releaseAndNotifyPLL);
    1.13 -
    1.14        if (!cm()->has_aborted()) {
    1.15          double count_start_sec = os::elapsedTime();
    1.16          if (PrintGC) {
    1.17 @@ -175,6 +171,7 @@
    1.18            }
    1.19          }
    1.20        }
    1.21 +
    1.22        double end_time = os::elapsedVTime();
    1.23        _vtime_count_accum += (end_time - counting_start_time);
    1.24        // Update the total virtual time before doing this, since it will try
    1.25 @@ -335,13 +332,15 @@
    1.26    clear_started();
    1.27  }
    1.28  
    1.29 -// Note: this method, although exported by the ConcurrentMarkSweepThread,
    1.30 -// which is a non-JavaThread, can only be called by a JavaThread.
    1.31 -// Currently this is done at vm creation time (post-vm-init) by the
    1.32 -// main/Primordial (Java)Thread.
    1.33 -// XXX Consider changing this in the future to allow the CMS thread
    1.34 +// Note: As is the case with CMS - this method, although exported
    1.35 +// by the ConcurrentMarkThread, which is a non-JavaThread, can only
    1.36 +// be called by a JavaThread. Currently this is done at vm creation
    1.37 +// time (post-vm-init) by the main/Primordial (Java)Thread.
    1.38 +// XXX Consider changing this in the future to allow the CM thread
    1.39  // itself to create this thread?
    1.40  void ConcurrentMarkThread::makeSurrogateLockerThread(TRAPS) {
    1.41 +  assert(UseG1GC, "SLT thread needed only for concurrent GC");
    1.42 +  assert(THREAD->is_Java_thread(), "must be a Java thread");
    1.43    assert(_slt == NULL, "SLT already created");
    1.44    _slt = SurrogateLockerThread::make(THREAD);
    1.45  }

mercurial