src/hotspot/share/gc/parallel/pcTasks.cpp
changeset 50071 758deedaae84
parent 50058 f7e564cacfbc
child 50297 580744d900c8
equal deleted inserted replaced
50070:c036b84c6bbf 50071:758deedaae84
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   165     }
   165     }
   166   }
   166   }
   167   PSParallelCompact::gc_task_manager()->execute_and_wait(q);
   167   PSParallelCompact::gc_task_manager()->execute_and_wait(q);
   168 }
   168 }
   169 
   169 
   170 void RefProcTaskExecutor::execute(EnqueueTask& task)
       
   171 {
       
   172   ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
       
   173   uint parallel_gc_threads = heap->gc_task_manager()->workers();
       
   174   GCTaskQueue* q = GCTaskQueue::create();
       
   175   for(uint i=0; i<parallel_gc_threads; i++) {
       
   176     q->enqueue(new RefEnqueueTaskProxy(task, i));
       
   177   }
       
   178   PSParallelCompact::gc_task_manager()->execute_and_wait(q);
       
   179 }
       
   180 
       
   181 //
   170 //
   182 // StealMarkingTask
   171 // StealMarkingTask
   183 //
   172 //
   184 
   173 
   185 StealMarkingTask::StealMarkingTask(ParallelTaskTerminator* t) :
   174 StealMarkingTask::StealMarkingTask(ParallelTaskTerminator* t) :