comparison src/share/vm/oops/constantPoolKlass.cpp @ 2379:b099aaf51bf8

6962931: move interned strings out of the perm gen Reviewed-by: never, coleenp, ysr, jwilhelm
author jcoomes
date Tue, 22 Mar 2011 13:36:33 -0700
parents 183658a2d0b3
children 38fea01eb669 a0de1dfd1933
comparison
equal deleted inserted replaced
2378:924777755fad 2379:b099aaf51bf8
283 } 283 }
284 284
285 void constantPoolKlass::oop_push_contents(PSPromotionManager* pm, oop obj) { 285 void constantPoolKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
286 assert(obj->is_constantPool(), "should be constant pool"); 286 assert(obj->is_constantPool(), "should be constant pool");
287 constantPoolOop cp = (constantPoolOop) obj; 287 constantPoolOop cp = (constantPoolOop) obj;
288 if (AnonymousClasses && cp->has_pseudo_string() && cp->tags() != NULL) { 288 if (cp->tags() != NULL &&
289 oop* base = (oop*)cp->base(); 289 (!JavaObjectsInPerm || (AnonymousClasses && cp->has_pseudo_string()))) {
290 for (int i = 0; i < cp->length(); ++i, ++base) { 290 for (int i = 1; i < cp->length(); ++i) {
291 if (cp->tag_at(i).is_string()) { 291 if (cp->tag_at(i).is_string()) {
292 oop* base = cp->obj_at_addr_raw(i);
292 if (PSScavenge::should_scavenge(base)) { 293 if (PSScavenge::should_scavenge(base)) {
293 pm->claim_or_forward_depth(base); 294 pm->claim_or_forward_depth(base);
294 } 295 }
295 } 296 }
296 } 297 }
458 } 459 }
459 } 460 }
460 if (cp->tag_at(i).is_string()) { 461 if (cp->tag_at(i).is_string()) {
461 if (!cp->has_pseudo_string()) { 462 if (!cp->has_pseudo_string()) {
462 if (entry.is_oop()) { 463 if (entry.is_oop()) {
463 guarantee(entry.get_oop()->is_perm(), "should be in permspace"); 464 guarantee(!JavaObjectsInPerm || entry.get_oop()->is_perm(),
465 "should be in permspace");
464 guarantee(entry.get_oop()->is_instance(), "should be instance"); 466 guarantee(entry.get_oop()->is_instance(), "should be instance");
465 } 467 }
466 } else { 468 } else {
467 // can be non-perm, can be non-instance (array) 469 // can be non-perm, can be non-instance (array)
468 } 470 }