8202780: Remove EnqueueTask related code from ReferenceProcessor after JDK-8202017
Remove code obsoleted by JDK-8202017 Reviewed-by: kbarrett, sangheki
This commit is contained in:
parent
816d8f4257
commit
b34a8c43f1
src/hotspot/share/gc
@ -5062,22 +5062,6 @@ void CMSRefProcTaskProxy::work(uint worker_id) {
|
||||
assert(_collector->_overflow_list == NULL, "non-empty _overflow_list");
|
||||
}
|
||||
|
||||
class CMSRefEnqueueTaskProxy: public AbstractGangTask {
|
||||
typedef AbstractRefProcTaskExecutor::EnqueueTask EnqueueTask;
|
||||
EnqueueTask& _task;
|
||||
|
||||
public:
|
||||
CMSRefEnqueueTaskProxy(EnqueueTask& task)
|
||||
: AbstractGangTask("Enqueue reference objects in parallel"),
|
||||
_task(task)
|
||||
{ }
|
||||
|
||||
virtual void work(uint worker_id)
|
||||
{
|
||||
_task.work(worker_id);
|
||||
}
|
||||
};
|
||||
|
||||
CMSParKeepAliveClosure::CMSParKeepAliveClosure(CMSCollector* collector,
|
||||
MemRegion span, CMSBitMap* bit_map, OopTaskQueue* work_queue):
|
||||
_span(span),
|
||||
@ -5147,16 +5131,6 @@ void CMSRefProcTaskExecutor::execute(ProcessTask& task)
|
||||
workers->run_task(&rp_task);
|
||||
}
|
||||
|
||||
void CMSRefProcTaskExecutor::execute(EnqueueTask& task)
|
||||
{
|
||||
|
||||
CMSHeap* heap = CMSHeap::heap();
|
||||
WorkGang* workers = heap->workers();
|
||||
assert(workers != NULL, "Need parallel worker threads.");
|
||||
CMSRefEnqueueTaskProxy enq_task(task);
|
||||
workers->run_task(&enq_task);
|
||||
}
|
||||
|
||||
void CMSCollector::refProcessingWork() {
|
||||
ResourceMark rm;
|
||||
HandleMark hm;
|
||||
|
@ -487,7 +487,6 @@ public:
|
||||
|
||||
// Executes a task using worker threads.
|
||||
virtual void execute(ProcessTask& task);
|
||||
virtual void execute(EnqueueTask& task);
|
||||
private:
|
||||
CMSCollector& _collector;
|
||||
};
|
||||
|
@ -789,21 +789,6 @@ void ParNewRefProcTaskProxy::work(uint worker_id) {
|
||||
par_scan_state.evacuate_followers_closure());
|
||||
}
|
||||
|
||||
class ParNewRefEnqueueTaskProxy: public AbstractGangTask {
|
||||
typedef AbstractRefProcTaskExecutor::EnqueueTask EnqueueTask;
|
||||
EnqueueTask& _task;
|
||||
|
||||
public:
|
||||
ParNewRefEnqueueTaskProxy(EnqueueTask& task)
|
||||
: AbstractGangTask("ParNewGeneration parallel reference enqueue"),
|
||||
_task(task)
|
||||
{ }
|
||||
|
||||
virtual void work(uint worker_id) {
|
||||
_task.work(worker_id);
|
||||
}
|
||||
};
|
||||
|
||||
void ParNewRefProcTaskExecutor::execute(ProcessTask& task) {
|
||||
CMSHeap* gch = CMSHeap::heap();
|
||||
WorkGang* workers = gch->workers();
|
||||
@ -816,14 +801,6 @@ void ParNewRefProcTaskExecutor::execute(ProcessTask& task) {
|
||||
_young_gen.promotion_failed());
|
||||
}
|
||||
|
||||
void ParNewRefProcTaskExecutor::execute(EnqueueTask& task) {
|
||||
CMSHeap* gch = CMSHeap::heap();
|
||||
WorkGang* workers = gch->workers();
|
||||
assert(workers != NULL, "Need parallel worker threads.");
|
||||
ParNewRefEnqueueTaskProxy enq_task(task);
|
||||
workers->run_task(&enq_task);
|
||||
}
|
||||
|
||||
void ParNewRefProcTaskExecutor::set_single_threaded_mode() {
|
||||
_state_set.flush();
|
||||
CMSHeap* heap = CMSHeap::heap();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -297,7 +297,6 @@ class ParNewRefProcTaskExecutor: public AbstractRefProcTaskExecutor {
|
||||
|
||||
// Executes a task using worker threads.
|
||||
virtual void execute(ProcessTask& task);
|
||||
virtual void execute(EnqueueTask& task);
|
||||
// Switch to single threaded mode.
|
||||
virtual void set_single_threaded_mode();
|
||||
};
|
||||
|
@ -3791,7 +3791,6 @@ public:
|
||||
|
||||
// Executes the given task using concurrent marking worker threads.
|
||||
virtual void execute(ProcessTask& task);
|
||||
virtual void execute(EnqueueTask& task);
|
||||
};
|
||||
|
||||
// Gang task for possibly parallel reference processing
|
||||
@ -3856,35 +3855,6 @@ void G1STWRefProcTaskExecutor::execute(ProcessTask& proc_task) {
|
||||
_workers->run_task(&proc_task_proxy);
|
||||
}
|
||||
|
||||
// Gang task for parallel reference enqueueing.
|
||||
|
||||
class G1STWRefEnqueueTaskProxy: public AbstractGangTask {
|
||||
typedef AbstractRefProcTaskExecutor::EnqueueTask EnqueueTask;
|
||||
EnqueueTask& _enq_task;
|
||||
|
||||
public:
|
||||
G1STWRefEnqueueTaskProxy(EnqueueTask& enq_task) :
|
||||
AbstractGangTask("Enqueue reference objects in parallel"),
|
||||
_enq_task(enq_task)
|
||||
{ }
|
||||
|
||||
virtual void work(uint worker_id) {
|
||||
_enq_task.work(worker_id);
|
||||
}
|
||||
};
|
||||
|
||||
// Driver routine for parallel reference enqueueing.
|
||||
// Creates an instance of the ref enqueueing gang
|
||||
// task and has the worker threads execute it.
|
||||
|
||||
void G1STWRefProcTaskExecutor::execute(EnqueueTask& enq_task) {
|
||||
assert(_workers != NULL, "Need parallel worker threads.");
|
||||
|
||||
G1STWRefEnqueueTaskProxy enq_task_proxy(enq_task);
|
||||
|
||||
_workers->run_task(&enq_task_proxy);
|
||||
}
|
||||
|
||||
// End of weak reference support closures
|
||||
|
||||
void G1CollectedHeap::process_discovered_references(G1ParScanThreadStateSet* per_thread_states) {
|
||||
|
@ -1520,7 +1520,6 @@ public:
|
||||
|
||||
// Executes the given task using concurrent marking worker threads.
|
||||
virtual void execute(ProcessTask& task);
|
||||
virtual void execute(EnqueueTask& task);
|
||||
};
|
||||
|
||||
class G1CMRefProcTaskProxy : public AbstractGangTask {
|
||||
@ -1565,36 +1564,6 @@ void G1CMRefProcTaskExecutor::execute(ProcessTask& proc_task) {
|
||||
_workers->run_task(&proc_task_proxy);
|
||||
}
|
||||
|
||||
class G1CMRefEnqueueTaskProxy : public AbstractGangTask {
|
||||
typedef AbstractRefProcTaskExecutor::EnqueueTask EnqueueTask;
|
||||
EnqueueTask& _enq_task;
|
||||
|
||||
public:
|
||||
G1CMRefEnqueueTaskProxy(EnqueueTask& enq_task) :
|
||||
AbstractGangTask("Enqueue reference objects in parallel"),
|
||||
_enq_task(enq_task) { }
|
||||
|
||||
virtual void work(uint worker_id) {
|
||||
_enq_task.work(worker_id);
|
||||
}
|
||||
};
|
||||
|
||||
void G1CMRefProcTaskExecutor::execute(EnqueueTask& enq_task) {
|
||||
assert(_workers != NULL, "Need parallel worker threads.");
|
||||
assert(_g1h->ref_processor_cm()->processing_is_mt(), "processing is not MT");
|
||||
|
||||
G1CMRefEnqueueTaskProxy enq_task_proxy(enq_task);
|
||||
|
||||
// Not strictly necessary but...
|
||||
//
|
||||
// We need to reset the concurrency level before each
|
||||
// proxy task execution, so that the termination protocol
|
||||
// and overflow handling in G1CMTask::do_marking_step() knows
|
||||
// how many workers to wait for.
|
||||
_cm->set_concurrency(_active_workers);
|
||||
_workers->run_task(&enq_task_proxy);
|
||||
}
|
||||
|
||||
void G1ConcurrentMark::weak_refs_work(bool clear_all_soft_refs) {
|
||||
ResourceMark rm;
|
||||
HandleMark hm;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -63,14 +63,6 @@ void G1FullGCReferenceProcessingExecutor::G1RefProcTaskProxy::work(uint worker_i
|
||||
*marker->stack_closure());
|
||||
}
|
||||
|
||||
G1FullGCReferenceProcessingExecutor::G1RefEnqueueTaskProxy::G1RefEnqueueTaskProxy(EnqueueTask& enq_task) :
|
||||
AbstractGangTask("G1 reference enqueue task"),
|
||||
_enq_task(enq_task) { }
|
||||
|
||||
void G1FullGCReferenceProcessingExecutor::G1RefEnqueueTaskProxy::work(uint worker_id) {
|
||||
_enq_task.work(worker_id);
|
||||
}
|
||||
|
||||
void G1FullGCReferenceProcessingExecutor::run_task(AbstractGangTask* task) {
|
||||
G1CollectedHeap::heap()->workers()->run_task(task, _collector->workers());
|
||||
}
|
||||
@ -80,12 +72,6 @@ void G1FullGCReferenceProcessingExecutor::execute(ProcessTask& proc_task) {
|
||||
run_task(&proc_task_proxy);
|
||||
}
|
||||
|
||||
// Driver routine for parallel reference processing.
|
||||
void G1FullGCReferenceProcessingExecutor::execute(EnqueueTask& enq_task) {
|
||||
G1RefEnqueueTaskProxy enq_task_proxy(enq_task);
|
||||
run_task(&enq_task_proxy);
|
||||
}
|
||||
|
||||
void G1FullGCReferenceProcessingExecutor::execute(STWGCTimer* timer, G1FullGCTracer* tracer) {
|
||||
GCTraceTime(Debug, gc, phases) debug("Phase 1: Reference Processing", timer);
|
||||
// Process reference objects found during marking.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -51,7 +51,6 @@ public:
|
||||
|
||||
// Executes the given task using concurrent marking worker threads.
|
||||
virtual void execute(ProcessTask& task);
|
||||
virtual void execute(EnqueueTask& task);
|
||||
|
||||
private:
|
||||
void run_task(AbstractGangTask* task);
|
||||
@ -68,15 +67,6 @@ private:
|
||||
|
||||
virtual void work(uint worker_id);
|
||||
};
|
||||
|
||||
class G1RefEnqueueTaskProxy: public AbstractGangTask {
|
||||
typedef AbstractRefProcTaskExecutor::EnqueueTask EnqueueTask;
|
||||
EnqueueTask& _enq_task;
|
||||
|
||||
public:
|
||||
G1RefEnqueueTaskProxy(EnqueueTask& enq_task);
|
||||
virtual void work(uint worker_id);
|
||||
};
|
||||
};
|
||||
|
||||
#endif // SHARE_GC_G1_G1FULLGCREFERENCEPROCESSOREXECUTOR_HPP
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -167,17 +167,6 @@ void RefProcTaskExecutor::execute(ProcessTask& task)
|
||||
PSParallelCompact::gc_task_manager()->execute_and_wait(q);
|
||||
}
|
||||
|
||||
void RefProcTaskExecutor::execute(EnqueueTask& task)
|
||||
{
|
||||
ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
|
||||
uint parallel_gc_threads = heap->gc_task_manager()->workers();
|
||||
GCTaskQueue* q = GCTaskQueue::create();
|
||||
for(uint i=0; i<parallel_gc_threads; i++) {
|
||||
q->enqueue(new RefEnqueueTaskProxy(task, i));
|
||||
}
|
||||
PSParallelCompact::gc_task_manager()->execute_and_wait(q);
|
||||
}
|
||||
|
||||
//
|
||||
// StealMarkingTask
|
||||
//
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -132,32 +132,6 @@ private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
//
|
||||
// RefEnqueueTaskProxy
|
||||
//
|
||||
// This task is used as a proxy to parallel reference processing tasks .
|
||||
//
|
||||
|
||||
class RefEnqueueTaskProxy: public GCTask {
|
||||
typedef AbstractRefProcTaskExecutor::EnqueueTask EnqueueTask;
|
||||
EnqueueTask& _enq_task;
|
||||
uint _work_id;
|
||||
|
||||
public:
|
||||
RefEnqueueTaskProxy(EnqueueTask& enq_task, uint work_id)
|
||||
: _enq_task(enq_task),
|
||||
_work_id(work_id)
|
||||
{ }
|
||||
|
||||
virtual char* name() { return (char *)"Enqueue reference objects in parallel"; }
|
||||
virtual void do_it(GCTaskManager* manager, uint which)
|
||||
{
|
||||
_enq_task.work(_work_id);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// RefProcTaskExecutor
|
||||
//
|
||||
@ -167,7 +141,6 @@ public:
|
||||
|
||||
class RefProcTaskExecutor: public AbstractRefProcTaskExecutor {
|
||||
virtual void execute(ProcessTask& task);
|
||||
virtual void execute(EnqueueTask& task);
|
||||
};
|
||||
|
||||
|
||||
|
@ -148,27 +148,8 @@ void PSRefProcTaskProxy::do_it(GCTaskManager* manager, uint which)
|
||||
_rp_task.work(_work_id, is_alive, keep_alive, evac_followers);
|
||||
}
|
||||
|
||||
class PSRefEnqueueTaskProxy: public GCTask {
|
||||
typedef AbstractRefProcTaskExecutor::EnqueueTask EnqueueTask;
|
||||
EnqueueTask& _enq_task;
|
||||
uint _work_id;
|
||||
|
||||
public:
|
||||
PSRefEnqueueTaskProxy(EnqueueTask& enq_task, uint work_id)
|
||||
: _enq_task(enq_task),
|
||||
_work_id(work_id)
|
||||
{ }
|
||||
|
||||
virtual char* name() { return (char *)"Enqueue reference objects in parallel"; }
|
||||
virtual void do_it(GCTaskManager* manager, uint which)
|
||||
{
|
||||
_enq_task.work(_work_id);
|
||||
}
|
||||
};
|
||||
|
||||
class PSRefProcTaskExecutor: public AbstractRefProcTaskExecutor {
|
||||
virtual void execute(ProcessTask& task);
|
||||
virtual void execute(EnqueueTask& task);
|
||||
};
|
||||
|
||||
void PSRefProcTaskExecutor::execute(ProcessTask& task)
|
||||
@ -188,17 +169,6 @@ void PSRefProcTaskExecutor::execute(ProcessTask& task)
|
||||
manager->execute_and_wait(q);
|
||||
}
|
||||
|
||||
|
||||
void PSRefProcTaskExecutor::execute(EnqueueTask& task)
|
||||
{
|
||||
GCTaskQueue* q = GCTaskQueue::create();
|
||||
GCTaskManager* manager = ParallelScavengeHeap::gc_task_manager();
|
||||
for(uint i=0; i < manager->active_workers(); i++) {
|
||||
q->enqueue(new PSRefEnqueueTaskProxy(task, i));
|
||||
}
|
||||
manager->execute_and_wait(q);
|
||||
}
|
||||
|
||||
// This method contains all heap specific policy for invoking scavenge.
|
||||
// PSScavenge::invoke_no_policy() will do nothing but attempt to
|
||||
// scavenge. It will not clean up after failed promotions, bail out if
|
||||
|
@ -589,11 +589,9 @@ public:
|
||||
|
||||
// Abstract tasks to execute.
|
||||
class ProcessTask;
|
||||
class EnqueueTask;
|
||||
|
||||
// Executes a task using worker threads.
|
||||
virtual void execute(ProcessTask& task) = 0;
|
||||
virtual void execute(EnqueueTask& task) = 0;
|
||||
|
||||
// Switch to single threaded mode.
|
||||
virtual void set_single_threaded_mode() { };
|
||||
@ -628,27 +626,4 @@ protected:
|
||||
const bool _marks_oops_alive;
|
||||
};
|
||||
|
||||
// Abstract reference processing task to execute.
|
||||
class AbstractRefProcTaskExecutor::EnqueueTask {
|
||||
protected:
|
||||
EnqueueTask(ReferenceProcessor& ref_processor,
|
||||
DiscoveredList refs_lists[],
|
||||
int n_queues,
|
||||
ReferenceProcessorPhaseTimes* phase_times)
|
||||
: _ref_processor(ref_processor),
|
||||
_refs_lists(refs_lists),
|
||||
_n_queues(n_queues),
|
||||
_phase_times(phase_times)
|
||||
{ }
|
||||
|
||||
public:
|
||||
virtual void work(unsigned int work_id) = 0;
|
||||
|
||||
protected:
|
||||
ReferenceProcessor& _ref_processor;
|
||||
DiscoveredList* _refs_lists;
|
||||
ReferenceProcessorPhaseTimes* _phase_times;
|
||||
int _n_queues;
|
||||
};
|
||||
|
||||
#endif // SHARE_VM_GC_SHARED_REFERENCEPROCESSOR_HPP
|
||||
|
Loading…
x
Reference in New Issue
Block a user