Mercurial > hg > graal-compiler
comparison src/share/vm/oops/klassKlass.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 | 0654ee04b214 |
comparison
equal
deleted
inserted
replaced
2375:d673ef06fe96 | 2376:c7f3d0b4570f |
---|---|
39 #include "oops/oop.inline2.hpp" | 39 #include "oops/oop.inline2.hpp" |
40 #include "oops/symbol.hpp" | 40 #include "oops/symbol.hpp" |
41 #include "oops/typeArrayKlass.hpp" | 41 #include "oops/typeArrayKlass.hpp" |
42 #include "runtime/handles.inline.hpp" | 42 #include "runtime/handles.inline.hpp" |
43 #ifndef SERIALGC | 43 #ifndef SERIALGC |
44 #include "gc_implementation/parNew/parOopClosures.inline.hpp" | |
45 #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp" | |
46 #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp" | |
47 #include "memory/cardTableRS.hpp" | |
44 #include "oops/oop.pcgc.inline.hpp" | 48 #include "oops/oop.pcgc.inline.hpp" |
45 #endif | 49 #endif |
46 | 50 |
47 int klassKlass::oop_size(oop obj) const { | 51 int klassKlass::oop_size(oop obj) const { |
48 assert (obj->is_klass(), "must be a klassOop"); | 52 assert (obj->is_klass(), "must be a klassOop"); |
173 return size; | 177 return size; |
174 } | 178 } |
175 | 179 |
176 #ifndef SERIALGC | 180 #ifndef SERIALGC |
177 void klassKlass::oop_push_contents(PSPromotionManager* pm, oop obj) { | 181 void klassKlass::oop_push_contents(PSPromotionManager* pm, oop obj) { |
182 Klass* k = Klass::cast(klassOop(obj)); | |
183 | |
184 oop* p = k->adr_java_mirror(); | |
185 if (PSScavenge::should_scavenge(p)) { | |
186 pm->claim_or_forward_depth(p); | |
187 } | |
178 } | 188 } |
179 | 189 |
180 int klassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) { | 190 int klassKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) { |
181 Klass* k = Klass::cast(klassOop(obj)); | 191 Klass* k = Klass::cast(klassOop(obj)); |
182 | 192 |
231 } | 241 } |
232 } | 242 } |
233 | 243 |
234 if (k->java_mirror() != NULL || (k->oop_is_instance() && instanceKlass::cast(klassOop(obj))->is_loaded())) { | 244 if (k->java_mirror() != NULL || (k->oop_is_instance() && instanceKlass::cast(klassOop(obj))->is_loaded())) { |
235 guarantee(k->java_mirror() != NULL, "should be allocated"); | 245 guarantee(k->java_mirror() != NULL, "should be allocated"); |
236 guarantee(k->java_mirror()->is_perm(), "should be in permspace"); | 246 guarantee(k->java_mirror()->is_perm() || !JavaObjectsInPerm, "should be in permspace"); |
237 guarantee(k->java_mirror()->is_instance(), "should be instance"); | 247 guarantee(k->java_mirror()->is_instance(), "should be instance"); |
238 } | 248 } |
239 } | 249 } |