comparison src/share/vm/memory/barrierSet.cpp @ 1091:6aa7255741f3

6906727: UseCompressedOops: some card-marking fixes related to object arrays Summary: Introduced a new write_ref_array(HeapWords* start, size_t count) method that does the requisite MemRegion range calculation so (some of the) clients of the erstwhile write_ref_array(MemRegion mr) do not need to worry. This removed all external uses of array_size(), which was also simplified and made private. Asserts were added to catch other possible issues. Further, less essential, fixes stemming from this investigation are deferred to CR 6904516 (to follow shortly in hs17). Reviewed-by: kvn, coleenp, jmasa
author ysr
date Thu, 03 Dec 2009 15:01:57 -0800
parents df6caf649ff7
children c18cbe5936b8
comparison
equal deleted inserted replaced
1090:fa357420e7d2 1091:6aa7255741f3
39 } 39 }
40 } 40 }
41 41
42 // count is number of array elements being written 42 // count is number of array elements being written
43 void BarrierSet::static_write_ref_array_post(HeapWord* start, size_t count) { 43 void BarrierSet::static_write_ref_array_post(HeapWord* start, size_t count) {
44 assert(count <= (size_t)max_intx, "count too large"); 44 // simply delegate to instance method
45 HeapWord* end = start + objArrayOopDesc::array_size((int)count); 45 Universe::heap()->barrier_set()->write_ref_array(start, count);
46 #if 0
47 warning("Post:\t" INTPTR_FORMAT "[" SIZE_FORMAT "] : [" INTPTR_FORMAT","INTPTR_FORMAT")\t",
48 start, count, start, end);
49 #endif
50 Universe::heap()->barrier_set()->write_ref_array_work(MemRegion(start, end));
51 } 46 }