hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp

Print this page
rev 611 : Merge

*** 1,10 **** #ifdef USE_PRAGMA_IDENT_SRC #pragma ident "@(#)psTasks.cpp 1.29 07/09/25 16:47:43 JVM" #endif /* ! * Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,10 ---- #ifdef USE_PRAGMA_IDENT_SRC #pragma ident "@(#)psTasks.cpp 1.29 07/09/25 16:47:43 JVM" #endif /* ! * Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 35,53 **** // Define before use class PSScavengeRootsClosure: public OopClosure { private: PSPromotionManager* _promotion_manager; ! public: ! PSScavengeRootsClosure(PSPromotionManager* pm) : _promotion_manager(pm) { } ! ! virtual void do_oop(oop* p) { ! if (PSScavenge::should_scavenge(*p)) { // We never card mark roots, maybe call a func without test? PSScavenge::copy_and_push_safe_barrier(_promotion_manager, p); } } }; void ScavengeRootsTask::do_it(GCTaskManager* manager, uint which) { assert(Universe::heap()->is_gc_active(), "called outside gc"); --- 35,55 ---- // Define before use class PSScavengeRootsClosure: public OopClosure { private: PSPromotionManager* _promotion_manager; ! protected: ! template <class T> void do_oop_work(T *p) { ! if (PSScavenge::should_scavenge(p)) { // We never card mark roots, maybe call a func without test? PSScavenge::copy_and_push_safe_barrier(_promotion_manager, p); } } + public: + PSScavengeRootsClosure(PSPromotionManager* pm) : _promotion_manager(pm) { } + void do_oop(oop* p) { PSScavengeRootsClosure::do_oop_work(p); } + void do_oop(narrowOop* p) { PSScavengeRootsClosure::do_oop_work(p); } }; void ScavengeRootsTask::do_it(GCTaskManager* manager, uint which) { assert(Universe::heap()->is_gc_active(), "called outside gc");
*** 136,146 **** "stacks should be empty at this point"); int random_seed = 17; if (pm->depth_first()) { while(true) { ! oop* p; if (PSPromotionManager::steal_depth(which, &random_seed, p)) { #if PS_PM_STATS pm->increment_steals(p); #endif // PS_PM_STATS pm->process_popped_location_depth(p); --- 138,148 ---- "stacks should be empty at this point"); int random_seed = 17; if (pm->depth_first()) { while(true) { ! StarTask p; if (PSPromotionManager::steal_depth(which, &random_seed, p)) { #if PS_PM_STATS pm->increment_steals(p); #endif // PS_PM_STATS pm->process_popped_location_depth(p);
*** 165,176 **** break; } } } } ! guarantee(pm->stacks_empty(), ! "stacks should be empty at this point"); } // // SerialOldToYoungRootsTask // --- 167,177 ---- break; } } } } ! guarantee(pm->stacks_empty(), "stacks should be empty at this point"); } // // SerialOldToYoungRootsTask //