1.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp Thu Mar 03 11:35:50 2011 +0100 1.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp Mon Mar 14 21:52:24 2011 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -51,7 +51,7 @@ 1.11 volatile jint ConcurrentMarkSweepThread::_pending_yields = 0; 1.12 volatile jint ConcurrentMarkSweepThread::_pending_decrements = 0; 1.13 1.14 -volatile bool ConcurrentMarkSweepThread::_icms_enabled = false; 1.15 +volatile jint ConcurrentMarkSweepThread::_icms_disabled = 0; 1.16 volatile bool ConcurrentMarkSweepThread::_should_run = false; 1.17 // When icms is enabled, the icms thread is stopped until explicitly 1.18 // started. 1.19 @@ -84,7 +84,7 @@ 1.20 } 1.21 } 1.22 _sltMonitor = SLT_lock; 1.23 - set_icms_enabled(CMSIncrementalMode); 1.24 + assert(!CMSIncrementalMode || icms_is_enabled(), "Error"); 1.25 } 1.26 1.27 void ConcurrentMarkSweepThread::run() { 1.28 @@ -341,11 +341,11 @@ 1.29 1.30 void ConcurrentMarkSweepThread::icms_wait() { 1.31 assert(UseConcMarkSweepGC && CMSIncrementalMode, "just checking"); 1.32 - if (_should_stop && icms_enabled()) { 1.33 + if (_should_stop && icms_is_enabled()) { 1.34 MutexLockerEx x(iCMS_lock, Mutex::_no_safepoint_check_flag); 1.35 trace_state("pause_icms"); 1.36 _collector->stats().stop_cms_timer(); 1.37 - while(!_should_run && icms_enabled()) { 1.38 + while(!_should_run && icms_is_enabled()) { 1.39 iCMS_lock->wait(Mutex::_no_safepoint_check_flag); 1.40 } 1.41 _collector->stats().start_cms_timer();