equal
deleted
inserted
replaced
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) : |