--- a/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp Mon May 25 11:39:43 2015 +0200
+++ b/hotspot/src/share/vm/gc/cms/parNewGeneration.cpp Mon May 25 11:41:34 2015 +0200
@@ -576,12 +576,6 @@
_strong_roots_scope(strong_roots_scope)
{}
-// Reset the terminator for the given number of
-// active threads.
-void ParNewGenTask::set_for_termination(uint active_workers) {
- _state_set->reset(active_workers, _gen->promotion_failed());
-}
-
void ParNewGenTask::work(uint worker_id) {
GenCollectedHeap* gch = GenCollectedHeap::heap();
// Since this is being done in a separate thread, need new resource
@@ -757,9 +751,6 @@
private:
virtual void work(uint worker_id);
- virtual void set_for_termination(uint active_workers) {
- _state_set.terminator()->reset_for_reuse(active_workers);
- }
private:
ParNewGeneration& _gen;
ProcessTask& _task;
@@ -949,6 +940,8 @@
*to(), *this, *_old_gen, *task_queues(),
_overflow_stacks, desired_plab_sz(), _term);
+ thread_state_set.reset(n_workers, promotion_failed());
+
{
StrongRootsScope srs(n_workers);