Mercurial > hg > graal-compiler
comparison src/share/vm/oops/objArrayKlassKlass.cpp @ 2376:c7f3d0b4570f
7017732: move static fields into Class to prepare for perm gen removal
Reviewed-by: kvn, coleenp, twisti, stefank
author | never |
---|---|
date | Fri, 18 Mar 2011 16:00:34 -0700 |
parents | e5383553fd4e |
children | fc9d8850ab8b |
comparison
equal
deleted
inserted
replaced
2375:d673ef06fe96 | 2376:c7f3d0b4570f |
---|---|
29 #include "gc_interface/collectedHeap.inline.hpp" | 29 #include "gc_interface/collectedHeap.inline.hpp" |
30 #include "oops/instanceKlass.hpp" | 30 #include "oops/instanceKlass.hpp" |
31 #include "oops/objArrayKlassKlass.hpp" | 31 #include "oops/objArrayKlassKlass.hpp" |
32 #include "oops/oop.inline.hpp" | 32 #include "oops/oop.inline.hpp" |
33 #include "oops/oop.inline2.hpp" | 33 #include "oops/oop.inline2.hpp" |
34 #ifndef SERIALGC | |
35 #include "gc_implementation/parNew/parOopClosures.inline.hpp" | |
36 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp" | |
37 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp" | |
38 #include "memory/cardTableRS.hpp" | |
39 #include "oops/oop.pcgc.inline.hpp" | |
40 #endif | |
34 | 41 |
35 klassOop objArrayKlassKlass::create_klass(TRAPS) { | 42 klassOop objArrayKlassKlass::create_klass(TRAPS) { |
36 objArrayKlassKlass o; | 43 objArrayKlassKlass o; |
37 KlassHandle h_this_klass(THREAD, Universe::klassKlassObj()); | 44 KlassHandle h_this_klass(THREAD, Universe::klassKlassObj()); |
38 KlassHandle k = base_create_klass(h_this_klass, header_size(), o.vtbl_value(), CHECK_0); | 45 KlassHandle k = base_create_klass(h_this_klass, header_size(), o.vtbl_value(), CHECK_0); |
234 addr = oak->element_klass_addr(); | 241 addr = oak->element_klass_addr(); |
235 if (mr.contains(addr)) blk->do_oop(addr); | 242 if (mr.contains(addr)) blk->do_oop(addr); |
236 addr = oak->bottom_klass_addr(); | 243 addr = oak->bottom_klass_addr(); |
237 if (mr.contains(addr)) blk->do_oop(addr); | 244 if (mr.contains(addr)) blk->do_oop(addr); |
238 | 245 |
239 return arrayKlassKlass::oop_oop_iterate(obj, blk); | 246 return arrayKlassKlass::oop_oop_iterate_m(obj, blk, mr); |
240 } | 247 } |
241 | 248 |
242 #ifndef SERIALGC | 249 #ifndef SERIALGC |
243 void objArrayKlassKlass::oop_push_contents(PSPromotionManager* pm, oop obj) { | 250 void objArrayKlassKlass::oop_push_contents(PSPromotionManager* pm, oop obj) { |
244 assert(obj->blueprint()->oop_is_objArrayKlass(),"must be an obj array klass"); | 251 assert(obj->blueprint()->oop_is_objArrayKlass(),"must be an obj array klass"); |
252 objArrayKlass* oak = objArrayKlass::cast((klassOop)obj); | |
253 oop* p = oak->element_klass_addr(); | |
254 if (PSScavenge::should_scavenge(p)) { | |
255 pm->claim_or_forward_depth(p); | |
256 } | |
257 p = oak->bottom_klass_addr(); | |
258 if (PSScavenge::should_scavenge(p)) { | |
259 pm->claim_or_forward_depth(p); | |
260 } | |
261 | |
262 arrayKlassKlass::oop_push_contents(pm, obj); | |
245 } | 263 } |
246 | 264 |
247 int objArrayKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) { | 265 int objArrayKlassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) { |
248 assert(obj->is_klass(), "must be klass"); | 266 assert(obj->is_klass(), "must be klass"); |
249 assert(klassOop(obj)->klass_part()->oop_is_objArray_slow(), "must be obj array"); | 267 assert(klassOop(obj)->klass_part()->oop_is_objArray_slow(), "must be obj array"); |
285 | 303 |
286 | 304 |
287 // Verification | 305 // Verification |
288 | 306 |
289 void objArrayKlassKlass::oop_verify_on(oop obj, outputStream* st) { | 307 void objArrayKlassKlass::oop_verify_on(oop obj, outputStream* st) { |
290 klassKlass::oop_verify_on(obj, st); | 308 arrayKlassKlass::oop_verify_on(obj, st); |
291 objArrayKlass* oak = objArrayKlass::cast((klassOop)obj); | 309 objArrayKlass* oak = objArrayKlass::cast((klassOop)obj); |
292 guarantee(oak->element_klass()->is_perm(), "should be in permspace"); | 310 guarantee(oak->element_klass()->is_perm(), "should be in permspace"); |
293 guarantee(oak->element_klass()->is_klass(), "should be klass"); | 311 guarantee(oak->element_klass()->is_klass(), "should be klass"); |
294 guarantee(oak->bottom_klass()->is_perm(), "should be in permspace"); | 312 guarantee(oak->bottom_klass()->is_perm(), "should be in permspace"); |
295 guarantee(oak->bottom_klass()->is_klass(), "should be klass"); | 313 guarantee(oak->bottom_klass()->is_klass(), "should be klass"); |