src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.hpp

changeset 8179
110735ab93ec
parent 6904
0982ec23da03
child 8604
04d83ba48607
equal deleted inserted replaced
8178:c6ef40024aa2 8179:110735ab93ec
346 HeapWord* _destination; 346 HeapWord* _destination;
347 size_t _source_region; 347 size_t _source_region;
348 HeapWord* _partial_obj_addr; 348 HeapWord* _partial_obj_addr;
349 region_sz_t _partial_obj_size; 349 region_sz_t _partial_obj_size;
350 region_sz_t volatile _dc_and_los; 350 region_sz_t volatile _dc_and_los;
351 bool _blocks_filled; 351 bool volatile _blocks_filled;
352 352
353 #ifdef ASSERT 353 #ifdef ASSERT
354 size_t _blocks_filled_count; // Number of block table fills. 354 size_t _blocks_filled_count; // Number of block table fills.
355 355
356 // These enable optimizations that are only partially implemented. Use 356 // These enable optimizations that are only partially implemented. Use
497 } 497 }
498 498
499 inline bool 499 inline bool
500 ParallelCompactData::RegionData::blocks_filled() const 500 ParallelCompactData::RegionData::blocks_filled() const
501 { 501 {
502 return _blocks_filled; 502 bool result = _blocks_filled;
503 OrderAccess::acquire();
504 return result;
503 } 505 }
504 506
505 #ifdef ASSERT 507 #ifdef ASSERT
506 inline size_t 508 inline size_t
507 ParallelCompactData::RegionData::blocks_filled_count() const 509 ParallelCompactData::RegionData::blocks_filled_count() const
511 #endif // #ifdef ASSERT 513 #endif // #ifdef ASSERT
512 514
513 inline void 515 inline void
514 ParallelCompactData::RegionData::set_blocks_filled() 516 ParallelCompactData::RegionData::set_blocks_filled()
515 { 517 {
518 OrderAccess::release();
516 _blocks_filled = true; 519 _blocks_filled = true;
517 // Debug builds count the number of times the table was filled. 520 // Debug builds count the number of times the table was filled.
518 DEBUG_ONLY(Atomic::inc_ptr(&_blocks_filled_count)); 521 DEBUG_ONLY(Atomic::inc_ptr(&_blocks_filled_count));
519 } 522 }
520 523

mercurial