8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/systemDictionary.hpp"
27 #include "code/codeCache.hpp"
28 #include "gc_implementation/parallelScavenge/cardTableExtension.hpp"
29 #include "gc_implementation/parallelScavenge/gcTaskManager.hpp"
30 #include "gc_implementation/parallelScavenge/psMarkSweep.hpp"
31 #include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
32 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
33 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
34 #include "gc_implementation/parallelScavenge/psTasks.hpp"
35 #include "memory/iterator.hpp"
36 #include "memory/universe.hpp"
37 #include "oops/oop.inline.hpp"
38 #include "runtime/fprofiler.hpp"
39 #include "runtime/thread.hpp"
40 #include "runtime/vmThread.hpp"
41 #include "services/management.hpp"
42 #include "utilities/taskqueue.inline.hpp"
43
44 //
45 // ScavengeRootsTask
46 //
47
48 void ScavengeRootsTask::do_it(GCTaskManager* manager, uint which) {
49 assert(ParallelScavengeHeap::heap()->is_gc_active(), "called outside gc");
50
51 PSPromotionManager* pm = PSPromotionManager::gc_thread_promotion_manager(which);
52 PSScavengeRootsClosure roots_closure(pm);
53 PSPromoteRootsClosure roots_to_old_closure(pm);
54
55 switch (_root_type) {
56 case universe:
57 Universe::oops_do(&roots_closure);
58 break;
59
60 case jni_handles:
61 JNIHandles::oops_do(&roots_closure);
62 break;
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "classfile/systemDictionary.hpp"
27 #include "code/codeCache.hpp"
28 #include "gc/parallel/cardTableExtension.hpp"
29 #include "gc/parallel/gcTaskManager.hpp"
30 #include "gc/parallel/psMarkSweep.hpp"
31 #include "gc/parallel/psPromotionManager.hpp"
32 #include "gc/parallel/psPromotionManager.inline.hpp"
33 #include "gc/parallel/psScavenge.inline.hpp"
34 #include "gc/parallel/psTasks.hpp"
35 #include "gc/shared/taskqueue.inline.hpp"
36 #include "memory/iterator.hpp"
37 #include "memory/universe.hpp"
38 #include "oops/oop.inline.hpp"
39 #include "runtime/fprofiler.hpp"
40 #include "runtime/thread.hpp"
41 #include "runtime/vmThread.hpp"
42 #include "services/management.hpp"
43
44 //
45 // ScavengeRootsTask
46 //
47
48 void ScavengeRootsTask::do_it(GCTaskManager* manager, uint which) {
49 assert(ParallelScavengeHeap::heap()->is_gc_active(), "called outside gc");
50
51 PSPromotionManager* pm = PSPromotionManager::gc_thread_promotion_manager(which);
52 PSScavengeRootsClosure roots_closure(pm);
53 PSPromoteRootsClosure roots_to_old_closure(pm);
54
55 switch (_root_type) {
56 case universe:
57 Universe::oops_do(&roots_closure);
58 break;
59
60 case jni_handles:
61 JNIHandles::oops_do(&roots_closure);
62 break;
|