< prev index next >

src/hotspot/share/gc/cms/cmsHeap.cpp

Print this page

        

*** 61,72 **** size_t used_in_bytes() { return _space->used(); } }; ! CMSHeap::CMSHeap(GenCollectorPolicy *policy) : ! GenCollectedHeap(policy), _eden_pool(NULL), _survivor_pool(NULL), _old_pool(NULL) { _workers = new WorkGang("GC Thread", ParallelGCThreads, /* are_GC_task_threads */true, /* are_ConcurrentGC_threads */false); _workers->initialize_workers(); } --- 61,78 ---- size_t used_in_bytes() { return _space->used(); } }; ! CMSHeap::CMSHeap(const CMSSettings& settings) : ! GenCollectedHeap(settings, ! Generation::ParNew, ! Generation::ConcurrentMarkSweep), ! _settings(settings), ! _eden_pool(NULL), ! _survivor_pool(NULL), ! _old_pool(NULL) { _workers = new WorkGang("GC Thread", ParallelGCThreads, /* are_GC_task_threads */true, /* are_ConcurrentGC_threads */false); _workers->initialize_workers(); }
*** 75,92 **** jint status = GenCollectedHeap::initialize(); if (status != JNI_OK) return status; // If we are running CMS, create the collector responsible // for collecting the CMS generations. - assert(collector_policy()->is_concurrent_mark_sweep_policy(), "must be CMS policy"); if (!create_cms_collector()) { return JNI_ENOMEM; } return JNI_OK; } void CMSHeap::initialize_serviceability() { _young_manager = new GCMemoryManager("ParNew", "end of minor GC"); _old_manager = new GCMemoryManager("ConcurrentMarkSweep", "end of major GC"); ParNewGeneration* young = (ParNewGeneration*) young_gen(); --- 81,101 ---- jint status = GenCollectedHeap::initialize(); if (status != JNI_OK) return status; // If we are running CMS, create the collector responsible // for collecting the CMS generations. if (!create_cms_collector()) { return JNI_ENOMEM; } return JNI_OK; } + void CMSHeap::initialize_gc_policy_counters() { + initialize_gc_policy_counters_helper("ParNew:CMS"); + } + void CMSHeap::initialize_serviceability() { _young_manager = new GCMemoryManager("ParNew", "end of minor GC"); _old_manager = new GCMemoryManager("ConcurrentMarkSweep", "end of major GC"); ParNewGeneration* young = (ParNewGeneration*) young_gen();
*** 150,164 **** } bool CMSHeap::create_cms_collector() { assert(old_gen()->kind() == Generation::ConcurrentMarkSweep, "Unexpected generation kinds"); - assert(gen_policy()->is_concurrent_mark_sweep_policy(), "Unexpected policy type"); CMSCollector* collector = ! new CMSCollector((ConcurrentMarkSweepGeneration*) old_gen(), ! rem_set(), ! gen_policy()->as_concurrent_mark_sweep_policy()); if (collector == NULL || !collector->completed_initialization()) { if (collector) { delete collector; // Be nice in embedded situation } --- 159,170 ---- } bool CMSHeap::create_cms_collector() { assert(old_gen()->kind() == Generation::ConcurrentMarkSweep, "Unexpected generation kinds"); CMSCollector* collector = ! new CMSCollector((ConcurrentMarkSweepGeneration*) old_gen(), rem_set()); if (collector == NULL || !collector->completed_initialization()) { if (collector) { delete collector; // Be nice in embedded situation }
< prev index next >