1 /* |
1 /* |
2 * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2002, 2012, 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. |
49 void ScavengeRootsTask::do_it(GCTaskManager* manager, uint which) { |
49 void ScavengeRootsTask::do_it(GCTaskManager* manager, uint which) { |
50 assert(Universe::heap()->is_gc_active(), "called outside gc"); |
50 assert(Universe::heap()->is_gc_active(), "called outside gc"); |
51 |
51 |
52 PSPromotionManager* pm = PSPromotionManager::gc_thread_promotion_manager(which); |
52 PSPromotionManager* pm = PSPromotionManager::gc_thread_promotion_manager(which); |
53 PSScavengeRootsClosure roots_closure(pm); |
53 PSScavengeRootsClosure roots_closure(pm); |
|
54 PSPromoteRootsClosure roots_to_old_closure(pm); |
54 |
55 |
55 switch (_root_type) { |
56 switch (_root_type) { |
56 case universe: |
57 case universe: |
57 Universe::oops_do(&roots_closure); |
58 Universe::oops_do(&roots_closure); |
58 break; |
59 break; |