< prev index next >
src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp
Print this page
rev 13206 : [mq]: 8179387.patch
*** 27,36 ****
--- 27,37 ----
#include "classfile/stringTable.hpp"
#include "classfile/symbolTable.hpp"
#include "classfile/systemDictionary.hpp"
#include "code/codeCache.hpp"
#include "gc/cms/cmsCollectorPolicy.hpp"
+ #include "gc/cms/cmsHeap.hpp"
#include "gc/cms/cmsOopClosures.inline.hpp"
#include "gc/cms/compactibleFreeListSpace.hpp"
#include "gc/cms/concurrentMarkSweepGeneration.inline.hpp"
#include "gc/cms/concurrentMarkSweepThread.hpp"
#include "gc/cms/parNewGeneration.hpp"
*** 2324,2334 ****
}
void CMSCollector::verify_after_remark_work_1() {
ResourceMark rm;
HandleMark hm;
! GenCollectedHeap* gch = GenCollectedHeap::heap();
// Get a clear set of claim bits for the roots processing to work with.
ClassLoaderDataGraph::clear_claimed_marks();
// Mark from roots one level into CMS
--- 2325,2335 ----
}
void CMSCollector::verify_after_remark_work_1() {
ResourceMark rm;
HandleMark hm;
! CMSHeap* gch = CMSHeap::heap();
// Get a clear set of claim bits for the roots processing to work with.
ClassLoaderDataGraph::clear_claimed_marks();
// Mark from roots one level into CMS
*** 2393,2403 ****
};
void CMSCollector::verify_after_remark_work_2() {
ResourceMark rm;
HandleMark hm;
! GenCollectedHeap* gch = GenCollectedHeap::heap();
// Get a clear set of claim bits for the roots processing to work with.
ClassLoaderDataGraph::clear_claimed_marks();
// Mark from roots one level into CMS
--- 2394,2404 ----
};
void CMSCollector::verify_after_remark_work_2() {
ResourceMark rm;
HandleMark hm;
! CMSHeap* gch = CMSHeap::heap();
// Get a clear set of claim bits for the roots processing to work with.
ClassLoaderDataGraph::clear_claimed_marks();
// Mark from roots one level into CMS
*** 2838,2848 ****
ResourceMark rm;
HandleMark hm;
MarkRefsIntoClosure notOlder(_span, &_markBitMap);
! GenCollectedHeap* gch = GenCollectedHeap::heap();
verify_work_stacks_empty();
verify_overflow_empty();
gch->ensure_parsability(false); // fill TLABs, but no need to retire them
--- 2839,2849 ----
ResourceMark rm;
HandleMark hm;
MarkRefsIntoClosure notOlder(_span, &_markBitMap);
! CMSHeap* gch = CMSHeap::heap();
verify_work_stacks_empty();
verify_overflow_empty();
gch->ensure_parsability(false); // fill TLABs, but no need to retire them
*** 4256,4266 ****
ResourceMark rm;
HandleMark hm;
// ---------- scan from roots --------------
_timer.start();
! GenCollectedHeap* gch = GenCollectedHeap::heap();
ParMarkRefsIntoClosure par_mri_cl(_collector->_span, &(_collector->_markBitMap));
// ---------- young gen roots --------------
{
work_on_young_gen_roots(&par_mri_cl);
--- 4257,4267 ----
ResourceMark rm;
HandleMark hm;
// ---------- scan from roots --------------
_timer.start();
! CMSHeap* gch = CMSHeap::heap();
ParMarkRefsIntoClosure par_mri_cl(_collector->_span, &(_collector->_markBitMap));
// ---------- young gen roots --------------
{
work_on_young_gen_roots(&par_mri_cl);
*** 4381,4391 ****
ResourceMark rm;
HandleMark hm;
// ---------- rescan from roots --------------
_timer.start();
! GenCollectedHeap* gch = GenCollectedHeap::heap();
ParMarkRefsIntoAndScanClosure par_mrias_cl(_collector,
_collector->_span, _collector->ref_processor(),
&(_collector->_markBitMap),
work_queue(worker_id));
--- 4382,4392 ----
ResourceMark rm;
HandleMark hm;
// ---------- rescan from roots --------------
_timer.start();
! CMSHeap* gch = CMSHeap::heap();
ParMarkRefsIntoAndScanClosure par_mrias_cl(_collector,
_collector->_span, _collector->ref_processor(),
&(_collector->_markBitMap),
work_queue(worker_id));
*** 4833,4843 ****
}
}
// Parallel version of remark
void CMSCollector::do_remark_parallel() {
! GenCollectedHeap* gch = GenCollectedHeap::heap();
WorkGang* workers = gch->workers();
assert(workers != NULL, "Need parallel worker threads.");
// Choose to use the number of GC workers most recently set
// into "active_workers".
uint n_workers = workers->active_workers();
--- 4834,4844 ----
}
}
// Parallel version of remark
void CMSCollector::do_remark_parallel() {
! CMSHeap* gch = CMSHeap::heap();
WorkGang* workers = gch->workers();
assert(workers != NULL, "Need parallel worker threads.");
// Choose to use the number of GC workers most recently set
// into "active_workers".
uint n_workers = workers->active_workers();
*** 4892,4902 ****
// Non-parallel version of remark
void CMSCollector::do_remark_non_parallel() {
ResourceMark rm;
HandleMark hm;
! GenCollectedHeap* gch = GenCollectedHeap::heap();
ReferenceProcessorMTDiscoveryMutator mt(ref_processor(), false);
MarkRefsIntoAndScanClosure
mrias_cl(_span, ref_processor(), &_markBitMap, NULL /* not precleaning */,
&_markStack, this,
--- 4893,4903 ----
// Non-parallel version of remark
void CMSCollector::do_remark_non_parallel() {
ResourceMark rm;
HandleMark hm;
! CMSHeap* gch = CMSHeap::heap();
ReferenceProcessorMTDiscoveryMutator mt(ref_processor(), false);
MarkRefsIntoAndScanClosure
mrias_cl(_span, ref_processor(), &_markBitMap, NULL /* not precleaning */,
&_markStack, this,
*** 5144,5154 ****
log_develop_trace(gc, task)("\t(%d: stole %d oops)", i, num_steals);
}
void CMSRefProcTaskExecutor::execute(ProcessTask& task)
{
! GenCollectedHeap* gch = GenCollectedHeap::heap();
WorkGang* workers = gch->workers();
assert(workers != NULL, "Need parallel worker threads.");
CMSRefProcTaskProxy rp_task(task, &_collector,
_collector.ref_processor()->span(),
_collector.markBitMap(),
--- 5145,5155 ----
log_develop_trace(gc, task)("\t(%d: stole %d oops)", i, num_steals);
}
void CMSRefProcTaskExecutor::execute(ProcessTask& task)
{
! CMSHeap* gch = CMSHeap::heap();
WorkGang* workers = gch->workers();
assert(workers != NULL, "Need parallel worker threads.");
CMSRefProcTaskProxy rp_task(task, &_collector,
_collector.ref_processor()->span(),
_collector.markBitMap(),
*** 5157,5167 ****
}
void CMSRefProcTaskExecutor::execute(EnqueueTask& task)
{
! GenCollectedHeap* gch = GenCollectedHeap::heap();
WorkGang* workers = gch->workers();
assert(workers != NULL, "Need parallel worker threads.");
CMSRefEnqueueTaskProxy enq_task(task);
workers->run_task(&enq_task);
}
--- 5158,5168 ----
}
void CMSRefProcTaskExecutor::execute(EnqueueTask& task)
{
! CMSHeap* gch = CMSHeap::heap();
WorkGang* workers = gch->workers();
assert(workers != NULL, "Need parallel worker threads.");
CMSRefEnqueueTaskProxy enq_task(task);
workers->run_task(&enq_task);
}
*** 5190,5200 ****
// Set the degree of MT here. If the discovery is done MT, there
// may have been a different number of threads doing the discovery
// and a different number of discovered lists may have Ref objects.
// That is OK as long as the Reference lists are balanced (see
// balance_all_queues() and balance_queues()).
! GenCollectedHeap* gch = GenCollectedHeap::heap();
uint active_workers = ParallelGCThreads;
WorkGang* workers = gch->workers();
if (workers != NULL) {
active_workers = workers->active_workers();
// The expectation is that active_workers will have already
--- 5191,5201 ----
// Set the degree of MT here. If the discovery is done MT, there
// may have been a different number of threads doing the discovery
// and a different number of discovered lists may have Ref objects.
// That is OK as long as the Reference lists are balanced (see
// balance_all_queues() and balance_queues()).
! CMSHeap* gch = CMSHeap::heap();
uint active_workers = ParallelGCThreads;
WorkGang* workers = gch->workers();
if (workers != NULL) {
active_workers = workers->active_workers();
// The expectation is that active_workers will have already
< prev index next >