comparison src/share/vm/oops/cpCacheKlass.cpp @ 1706:9d7a8ab3736b

6962589: remove breadth first scanning code from parallel gc Summary: Remove the breadth-first copying order from ParallelScavenge and use depth-first by default. Reviewed-by: jcoomes, ysr, johnc
author tonyp
date Thu, 22 Jul 2010 10:27:41 -0400
parents c18cbe5936b8
children 7fcd5f39bd7a
comparison
equal deleted inserted replaced
1705:2d160770d2e5 1706:9d7a8ab3736b
164 assert(obj->is_constantPoolCache(), "should be constant pool"); 164 assert(obj->is_constantPoolCache(), "should be constant pool");
165 return constantPoolCacheOop(obj)->is_conc_safe(); 165 return constantPoolCacheOop(obj)->is_conc_safe();
166 } 166 }
167 167
168 #ifndef SERIALGC 168 #ifndef SERIALGC
169 void constantPoolCacheKlass::oop_copy_contents(PSPromotionManager* pm,
170 oop obj) {
171 assert(obj->is_constantPoolCache(), "should be constant pool");
172 if (EnableInvokeDynamic) {
173 constantPoolCacheOop cache = (constantPoolCacheOop)obj;
174 // during a scavenge, it is safe to inspect my pool, since it is perm
175 constantPoolOop pool = cache->constant_pool();
176 assert(pool->is_constantPool(), "should be constant pool");
177 if (pool->has_invokedynamic()) {
178 for (int i = 0; i < cache->length(); i++) {
179 ConstantPoolCacheEntry* e = cache->entry_at(i);
180 oop* p = (oop*)&e->_f1;
181 if (e->is_secondary_entry()) {
182 if (PSScavenge::should_scavenge(p))
183 pm->claim_or_forward_breadth(p);
184 assert(!(e->is_vfinal() && PSScavenge::should_scavenge((oop*)&e->_f2)),
185 "no live oops here");
186 }
187 }
188 }
189 }
190 }
191
192 void constantPoolCacheKlass::oop_push_contents(PSPromotionManager* pm, 169 void constantPoolCacheKlass::oop_push_contents(PSPromotionManager* pm,
193 oop obj) { 170 oop obj) {
194 assert(obj->is_constantPoolCache(), "should be constant pool"); 171 assert(obj->is_constantPoolCache(), "should be constant pool");
195 if (EnableInvokeDynamic) { 172 if (EnableInvokeDynamic) {
196 constantPoolCacheOop cache = (constantPoolCacheOop)obj; 173 constantPoolCacheOop cache = (constantPoolCacheOop)obj;