1.1 --- a/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp Thu Sep 30 12:15:13 2010 -0700 1.2 +++ b/src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp Fri Oct 01 18:23:16 2010 -0700 1.3 @@ -69,12 +69,12 @@ 1.4 1.5 ConcurrentMark* cm() { return _cm; } 1.6 1.7 - void set_started() { _started = true; } 1.8 - void clear_started() { _started = false; } 1.9 + void set_started() { assert(!_in_progress, "cycle in progress"); _started = true; } 1.10 + void clear_started() { assert(_in_progress, "must be starting a cycle"); _started = false; } 1.11 bool started() { return _started; } 1.12 1.13 - void set_in_progress() { _in_progress = true; } 1.14 - void clear_in_progress() { _in_progress = false; } 1.15 + void set_in_progress() { assert(_started, "must be starting a cycle"); _in_progress = true; } 1.16 + void clear_in_progress() { assert(!_started, "must not be starting a new cycle"); _in_progress = false; } 1.17 bool in_progress() { return _in_progress; } 1.18 1.19 // This flag returns true from the moment a marking cycle is