Mercurial > hg > truffle
comparison src/share/vm/memory/space.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 | 2fc0334f613a |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
176 assert(_min_done == _last_explicit_min_done, | 176 assert(_min_done == _last_explicit_min_done, |
177 "Don't update _min_done for idempotent cl"); | 177 "Don't update _min_done for idempotent cl"); |
178 } | 178 } |
179 } | 179 } |
180 | 180 |
181 DirtyCardToOopClosure* Space::new_dcto_cl(OopClosure* cl, | 181 DirtyCardToOopClosure* Space::new_dcto_cl(ExtendedOopClosure* cl, |
182 CardTableModRefBS::PrecisionStyle precision, | 182 CardTableModRefBS::PrecisionStyle precision, |
183 HeapWord* boundary) { | 183 HeapWord* boundary) { |
184 return new DirtyCardToOopClosure(this, cl, precision, boundary); | 184 return new DirtyCardToOopClosure(this, cl, precision, boundary); |
185 } | 185 } |
186 | 186 |
251 } | 251 } |
252 | 252 |
253 // (There are only two of these, rather than N, because the split is due | 253 // (There are only two of these, rather than N, because the split is due |
254 // only to the introduction of the FilteringClosure, a local part of the | 254 // only to the introduction of the FilteringClosure, a local part of the |
255 // impl of this abstraction.) | 255 // impl of this abstraction.) |
256 ContiguousSpaceDCTOC__walk_mem_region_with_cl_DEFN(OopClosure) | 256 ContiguousSpaceDCTOC__walk_mem_region_with_cl_DEFN(ExtendedOopClosure) |
257 ContiguousSpaceDCTOC__walk_mem_region_with_cl_DEFN(FilteringClosure) | 257 ContiguousSpaceDCTOC__walk_mem_region_with_cl_DEFN(FilteringClosure) |
258 | 258 |
259 DirtyCardToOopClosure* | 259 DirtyCardToOopClosure* |
260 ContiguousSpace::new_dcto_cl(OopClosure* cl, | 260 ContiguousSpace::new_dcto_cl(ExtendedOopClosure* cl, |
261 CardTableModRefBS::PrecisionStyle precision, | 261 CardTableModRefBS::PrecisionStyle precision, |
262 HeapWord* boundary) { | 262 HeapWord* boundary) { |
263 return new ContiguousSpaceDCTOC(this, cl, precision, boundary); | 263 return new ContiguousSpaceDCTOC(this, cl, precision, boundary); |
264 } | 264 } |
265 | 265 |
546 top() == block_start_const(top()), | 546 top() == block_start_const(top()), |
547 "top should be start of unallocated block, if it exists"); | 547 "top should be start of unallocated block, if it exists"); |
548 } | 548 } |
549 } | 549 } |
550 | 550 |
551 void Space::oop_iterate(OopClosure* blk) { | 551 void Space::oop_iterate(ExtendedOopClosure* blk) { |
552 ObjectToOopClosure blk2(blk); | 552 ObjectToOopClosure blk2(blk); |
553 object_iterate(&blk2); | 553 object_iterate(&blk2); |
554 } | 554 } |
555 | 555 |
556 HeapWord* Space::object_iterate_careful(ObjectClosureCareful* cl) { | 556 HeapWord* Space::object_iterate_careful(ObjectClosureCareful* cl) { |
677 ALL_PAR_OOP_ITERATE_CLOSURES(ContigSpace_PAR_OOP_ITERATE_DEFN) | 677 ALL_PAR_OOP_ITERATE_CLOSURES(ContigSpace_PAR_OOP_ITERATE_DEFN) |
678 | 678 |
679 #undef ContigSpace_PAR_OOP_ITERATE_DEFN | 679 #undef ContigSpace_PAR_OOP_ITERATE_DEFN |
680 #endif // SERIALGC | 680 #endif // SERIALGC |
681 | 681 |
682 void ContiguousSpace::oop_iterate(OopClosure* blk) { | 682 void ContiguousSpace::oop_iterate(ExtendedOopClosure* blk) { |
683 if (is_empty()) return; | 683 if (is_empty()) return; |
684 HeapWord* obj_addr = bottom(); | 684 HeapWord* obj_addr = bottom(); |
685 HeapWord* t = top(); | 685 HeapWord* t = top(); |
686 // Could call objects iterate, but this is easier. | 686 // Could call objects iterate, but this is easier. |
687 while (obj_addr < t) { | 687 while (obj_addr < t) { |
688 obj_addr += oop(obj_addr)->oop_iterate(blk); | 688 obj_addr += oop(obj_addr)->oop_iterate(blk); |
689 } | 689 } |
690 } | 690 } |
691 | 691 |
692 void ContiguousSpace::oop_iterate(MemRegion mr, OopClosure* blk) { | 692 void ContiguousSpace::oop_iterate(MemRegion mr, ExtendedOopClosure* blk) { |
693 if (is_empty()) { | 693 if (is_empty()) { |
694 return; | 694 return; |
695 } | 695 } |
696 MemRegion cur = MemRegion(bottom(), top()); | 696 MemRegion cur = MemRegion(bottom(), top()); |
697 mr = mr.intersection(cur); | 697 mr = mr.intersection(cur); |
1000 p += size; | 1000 p += size; |
1001 } | 1001 } |
1002 guarantee(p == top(), "end of last object must match end of space"); | 1002 guarantee(p == top(), "end of last object must match end of space"); |
1003 } | 1003 } |
1004 | 1004 |
1005 void OffsetTableContigSpace::serialize_block_offset_array_offsets( | |
1006 SerializeOopClosure* soc) { | |
1007 _offsets.serialize(soc); | |
1008 } | |
1009 | |
1010 | 1005 |
1011 size_t TenuredSpace::allowed_dead_ratio() const { | 1006 size_t TenuredSpace::allowed_dead_ratio() const { |
1012 return MarkSweepDeadRatio; | 1007 return MarkSweepDeadRatio; |
1013 } | 1008 } |
1014 | |
1015 | |
1016 size_t ContigPermSpace::allowed_dead_ratio() const { | |
1017 return PermMarkSweepDeadRatio; | |
1018 } |