mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
6906727: UseCompressedOops: some card-marking fixes related to object arrays
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
This commit is contained in:
parent
5a239d996b
commit
d875a8e0f1
8 changed files with 74 additions and 36 deletions
|
@ -1124,8 +1124,7 @@ class BacktraceBuilder: public StackObj {
|
|||
if (_dirty && _methods != NULL) {
|
||||
BarrierSet* bs = Universe::heap()->barrier_set();
|
||||
assert(bs->has_write_ref_array_opt(), "Barrier set must have ref array opt");
|
||||
bs->write_ref_array(MemRegion((HeapWord*)_methods->base(),
|
||||
_methods->array_size()));
|
||||
bs->write_ref_array((HeapWord*)_methods->base(), _methods->length());
|
||||
_dirty = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue