Skip to content

Commit 19f01ab

Browse files
author
Thomas Schatzl
committedMar 24, 2022
8283555: G1: Concurrent mark accesses uninitialized BOT of closed archive regions
Reviewed-by: ayang, iwalulya
1 parent 929b6a3 commit 19f01ab

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

Diff for: ‎src/hotspot/share/cds/filemap.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -2330,6 +2330,11 @@ void FileMapInfo::fixup_mapped_heap_regions() {
23302330
"Null closed_heap_regions array with non-zero count");
23312331
G1CollectedHeap::heap()->fill_archive_regions(closed_heap_regions,
23322332
num_closed_heap_regions);
2333+
// G1 marking uses the BOT for object chunking during marking in
2334+
// G1CMObjArrayProcessor::process_slice(); for this reason we need to
2335+
// initialize the BOT for closed archive regions too.
2336+
G1CollectedHeap::heap()->populate_archive_regions_bot_part(closed_heap_regions,
2337+
num_closed_heap_regions);
23332338
}
23342339

23352340
// do the same for mapped open archive heap regions
@@ -2342,11 +2347,6 @@ void FileMapInfo::fixup_mapped_heap_regions() {
23422347
// fast G1BlockOffsetTablePart::block_start operations for any given address
23432348
// within the open archive regions when trying to find start of an object
23442349
// (e.g. during card table scanning).
2345-
//
2346-
// This is only needed for open archive regions but not the closed archive
2347-
// regions, because objects in closed archive regions never reference objects
2348-
// outside the closed archive regions and they are immutable. So we never
2349-
// need their BOT during garbage collection.
23502350
G1CollectedHeap::heap()->populate_archive_regions_bot_part(open_heap_regions,
23512351
num_open_heap_regions);
23522352
}

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Mar 24, 2022

@openjdk-notifier[bot]
Please sign in to comment.