Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp @ 495:234c22e54b98
6784849: par compact - can fail when to_space is non-empty
Reviewed-by: jmasa, tonyp
author | jcoomes |
---|---|
date | Thu, 18 Dec 2008 10:53:35 -0800 |
parents | 0f773163217d |
children | b27c885f75f9 |
comparison
equal
deleted
inserted
replaced
494:d593294016c3 | 495:234c22e54b98 |
---|---|
1152 SpaceId& src_space_id, | 1152 SpaceId& src_space_id, |
1153 HeapWord*& src_space_top, | 1153 HeapWord*& src_space_top, |
1154 HeapWord* end_addr); | 1154 HeapWord* end_addr); |
1155 | 1155 |
1156 // Decrement the destination count for each non-empty source region in the | 1156 // Decrement the destination count for each non-empty source region in the |
1157 // range [beg_region, region(region_align_up(end_addr))). | 1157 // range [beg_region, region(region_align_up(end_addr))). If the destination |
1158 // count for a region goes to 0 and it needs to be filled, enqueue it. | |
1158 static void decrement_destination_counts(ParCompactionManager* cm, | 1159 static void decrement_destination_counts(ParCompactionManager* cm, |
1160 SpaceId src_space_id, | |
1159 size_t beg_region, | 1161 size_t beg_region, |
1160 HeapWord* end_addr); | 1162 HeapWord* end_addr); |
1161 | 1163 |
1162 // Fill a region, copying objects from one or more source regions. | 1164 // Fill a region, copying objects from one or more source regions. |
1163 static void fill_region(ParCompactionManager* cm, size_t region_idx); | 1165 static void fill_region(ParCompactionManager* cm, size_t region_idx); |
1228 SpaceId src_space_id, | 1230 SpaceId src_space_id, |
1229 HeapWord* src_beg, HeapWord* src_end); | 1231 HeapWord* src_beg, HeapWord* src_end); |
1230 #endif // #ifndef PRODUCT | 1232 #endif // #ifndef PRODUCT |
1231 | 1233 |
1232 #ifdef ASSERT | 1234 #ifdef ASSERT |
1235 // Sanity check the new location of a word in the heap. | |
1236 static inline void check_new_location(HeapWord* old_addr, HeapWord* new_addr); | |
1233 // Verify that all the regions have been emptied. | 1237 // Verify that all the regions have been emptied. |
1234 static void verify_complete(SpaceId space_id); | 1238 static void verify_complete(SpaceId space_id); |
1235 #endif // #ifdef ASSERT | 1239 #endif // #ifdef ASSERT |
1236 }; | 1240 }; |
1237 | 1241 |
1395 if (is_in((HeapWord*)p, beg_addr, end_addr)) { | 1399 if (is_in((HeapWord*)p, beg_addr, end_addr)) { |
1396 adjust_pointer(p); | 1400 adjust_pointer(p); |
1397 } | 1401 } |
1398 } | 1402 } |
1399 | 1403 |
1404 #ifdef ASSERT | |
1405 inline void | |
1406 PSParallelCompact::check_new_location(HeapWord* old_addr, HeapWord* new_addr) | |
1407 { | |
1408 assert(old_addr >= new_addr || space_id(old_addr) != space_id(new_addr), | |
1409 "must move left or to a different space"); | |
1410 } | |
1411 #endif // ASSERT | |
1412 | |
1400 class MoveAndUpdateClosure: public ParMarkBitMapClosure { | 1413 class MoveAndUpdateClosure: public ParMarkBitMapClosure { |
1401 public: | 1414 public: |
1402 inline MoveAndUpdateClosure(ParMarkBitMap* bitmap, ParCompactionManager* cm, | 1415 inline MoveAndUpdateClosure(ParMarkBitMap* bitmap, ParCompactionManager* cm, |
1403 ObjectStartArray* start_array, | 1416 ObjectStartArray* start_array, |
1404 HeapWord* destination, size_t words); | 1417 HeapWord* destination, size_t words); |