Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8292607: Remove unused dirty and dirty_card_range_after_reset in CardTable #9920

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 0 additions & 38 deletions src/hotspot/share/gc/shared/cardTable.cpp
Expand Up @@ -379,44 +379,6 @@ void CardTable::clear(MemRegion mr) {
}
}

void CardTable::dirty(MemRegion mr) {
CardValue* first = byte_for(mr.start());
CardValue* last = byte_after(mr.last());
memset(first, dirty_card, last-first);
}

MemRegion CardTable::dirty_card_range_after_reset(MemRegion mr,
bool reset,
int reset_val) {
for (int i = 0; i < _cur_covered_regions; i++) {
MemRegion mri = mr.intersection(_covered[i]);
if (!mri.is_empty()) {
CardValue* cur_entry, *next_entry, *limit;
for (cur_entry = byte_for(mri.start()), limit = byte_for(mri.last());
cur_entry <= limit;
cur_entry = next_entry) {
next_entry = cur_entry + 1;
if (*cur_entry == dirty_card) {
size_t dirty_cards;
// Accumulate maximal dirty card range, starting at cur_entry
for (dirty_cards = 1;
next_entry <= limit && *next_entry == dirty_card;
dirty_cards++, next_entry++);
MemRegion cur_cards(addr_for(cur_entry),
dirty_cards * _card_size_in_words);
if (reset) {
for (size_t i = 0; i < dirty_cards; i++) {
cur_entry[i] = reset_val;
}
}
return cur_cards;
}
}
}
}
return MemRegion(mr.end(), mr.end());
}

uintx CardTable::ct_max_alignment_constraint() {
// Calculate maximum alignment using GCCardSizeInBytes as card_size hasn't been set yet
return GCCardSizeInBytes * os::vm_page_size();
Expand Down
8 changes: 0 additions & 8 deletions src/hotspot/share/gc/shared/cardTable.hpp
Expand Up @@ -173,7 +173,6 @@ class CardTable: public CHeapObj<mtGC> {

virtual void invalidate(MemRegion mr);
void clear(MemRegion mr);
void dirty(MemRegion mr);

// Provide read-only access to the card table array.
const CardValue* byte_for_const(const void* p) const {
Expand Down Expand Up @@ -220,13 +219,6 @@ class CardTable: public CHeapObj<mtGC> {

static uintx ct_max_alignment_constraint();

// Return the MemRegion corresponding to the first maximal run
// of dirty cards lying completely within MemRegion mr.
// If reset is "true", then sets those card table entries to the given
// value.
MemRegion dirty_card_range_after_reset(MemRegion mr, bool reset,
int reset_val);

static uint card_shift() {
return _card_shift;
}
Expand Down