Skip to content

Commit

Permalink
8303244: G1: call CardTable::clear_MemRegion directly
Browse files Browse the repository at this point in the history
Reviewed-by: ysr, kbarrett
  • Loading branch information
albertnetymk committed Mar 6, 2023
1 parent 5753ab5 commit ec4e8aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/g1CardTable.cpp
Expand Up @@ -44,7 +44,7 @@ void G1CardTable::verify_g1_young_region(MemRegion mr) {
void G1CardTableChangedListener::on_commit(uint start_idx, size_t num_regions, bool zero_filled) {
// Default value for a clean card on the card table is -1. So we cannot take advantage of the zero_filled parameter.
MemRegion mr(G1CollectedHeap::heap()->bottom_addr_for_region(start_idx), num_regions * HeapRegion::GrainWords);
_card_table->clear(mr);
_card_table->clear_MemRegion(mr);
}

void G1CardTable::initialize(G1RegionToSpaceMapper* mapper) {
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/heapRegion.cpp
Expand Up @@ -135,7 +135,7 @@ void HeapRegion::hr_clear(bool clear_space) {

void HeapRegion::clear_cardtable() {
G1CardTable* ct = G1CollectedHeap::heap()->card_table();
ct->clear(MemRegion(bottom(), end()));
ct->clear_MemRegion(MemRegion(bottom(), end()));
}

void HeapRegion::calc_gc_efficiency() {
Expand Down

1 comment on commit ec4e8aa

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.