Mercurial > hg > graal-compiler
comparison src/share/vm/memory/generation.cpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | b632e80fc9dc |
children | 8617e38bb4cb |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
291 return blk.is_obj; | 291 return blk.is_obj; |
292 } | 292 } |
293 | 293 |
294 class GenerationOopIterateClosure : public SpaceClosure { | 294 class GenerationOopIterateClosure : public SpaceClosure { |
295 public: | 295 public: |
296 OopClosure* cl; | 296 ExtendedOopClosure* cl; |
297 MemRegion mr; | 297 MemRegion mr; |
298 virtual void do_space(Space* s) { | 298 virtual void do_space(Space* s) { |
299 s->oop_iterate(mr, cl); | 299 s->oop_iterate(mr, cl); |
300 } | 300 } |
301 GenerationOopIterateClosure(OopClosure* _cl, MemRegion _mr) : | 301 GenerationOopIterateClosure(ExtendedOopClosure* _cl, MemRegion _mr) : |
302 cl(_cl), mr(_mr) {} | 302 cl(_cl), mr(_mr) {} |
303 }; | 303 }; |
304 | 304 |
305 void Generation::oop_iterate(OopClosure* cl) { | 305 void Generation::oop_iterate(ExtendedOopClosure* cl) { |
306 GenerationOopIterateClosure blk(cl, _reserved); | 306 GenerationOopIterateClosure blk(cl, _reserved); |
307 space_iterate(&blk); | 307 space_iterate(&blk); |
308 } | 308 } |
309 | 309 |
310 void Generation::oop_iterate(MemRegion mr, OopClosure* cl) { | 310 void Generation::oop_iterate(MemRegion mr, ExtendedOopClosure* cl) { |
311 GenerationOopIterateClosure blk(cl, mr); | 311 GenerationOopIterateClosure blk(cl, mr); |
312 space_iterate(&blk); | 312 space_iterate(&blk); |
313 } | 313 } |
314 | 314 |
315 void Generation::younger_refs_in_space_iterate(Space* sp, | 315 void Generation::younger_refs_in_space_iterate(Space* sp, |
433 } | 433 } |
434 if (!success) { | 434 if (!success) { |
435 success = grow_to_reserved(); | 435 success = grow_to_reserved(); |
436 } | 436 } |
437 if (PrintGC && Verbose) { | 437 if (PrintGC && Verbose) { |
438 if (success && GC_locker::is_active()) { | 438 if (success && GC_locker::is_active_and_needs_gc()) { |
439 gclog_or_tty->print_cr("Garbage collection disabled, expanded heap instead"); | 439 gclog_or_tty->print_cr("Garbage collection disabled, expanded heap instead"); |
440 } | 440 } |
441 } | 441 } |
442 | 442 |
443 return success; | 443 return success; |