1.1 --- a/src/share/vm/oops/cpCacheKlass.cpp Fri Mar 18 15:52:42 2011 -0700 1.2 +++ b/src/share/vm/oops/cpCacheKlass.cpp Fri Mar 18 16:00:34 2011 -0700 1.3 @@ -168,22 +168,18 @@ 1.4 void constantPoolCacheKlass::oop_push_contents(PSPromotionManager* pm, 1.5 oop obj) { 1.6 assert(obj->is_constantPoolCache(), "should be constant pool"); 1.7 - if (EnableInvokeDynamic) { 1.8 + if (ScavengeRootsInCode) { 1.9 constantPoolCacheOop cache = (constantPoolCacheOop)obj; 1.10 // during a scavenge, it is safe to inspect my pool, since it is perm 1.11 constantPoolOop pool = cache->constant_pool(); 1.12 assert(pool->is_constantPool(), "should be constant pool"); 1.13 - if (pool->has_invokedynamic()) { 1.14 - for (int i = 0; i < cache->length(); i++) { 1.15 - ConstantPoolCacheEntry* e = cache->entry_at(i); 1.16 - oop* p = (oop*)&e->_f1; 1.17 - if (e->is_secondary_entry()) { 1.18 - if (PSScavenge::should_scavenge(p)) 1.19 - pm->claim_or_forward_depth(p); 1.20 - assert(!(e->is_vfinal() && PSScavenge::should_scavenge((oop*)&e->_f2)), 1.21 - "no live oops here"); 1.22 - } 1.23 - } 1.24 + for (int i = 0; i < cache->length(); i++) { 1.25 + ConstantPoolCacheEntry* e = cache->entry_at(i); 1.26 + oop* p = (oop*)&e->_f1; 1.27 + if (PSScavenge::should_scavenge(p)) 1.28 + pm->claim_or_forward_depth(p); 1.29 + assert(!(e->is_vfinal() && PSScavenge::should_scavenge((oop*)&e->_f2)), 1.30 + "no live oops here"); 1.31 } 1.32 } 1.33 }