mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-11 19:08:23 +00:00
8318908: Parallel: Remove ExtendedCardValue
Reviewed-by: tschatzl, sjohanss
This commit is contained in:
parent
7452d50be5
commit
f4c5db92ea
@ -389,20 +389,7 @@ void PSCardTable::verify_all_young_refs_imprecise() {
|
||||
|
||||
bool PSCardTable::addr_is_marked_imprecise(void *addr) {
|
||||
CardValue* p = byte_for(addr);
|
||||
CardValue val = *p;
|
||||
|
||||
if (card_is_dirty(val))
|
||||
return true;
|
||||
|
||||
if (card_is_newgen(val))
|
||||
return true;
|
||||
|
||||
if (card_is_clean(val))
|
||||
return false;
|
||||
|
||||
assert(false, "Found unhandled card mark type");
|
||||
|
||||
return false;
|
||||
return is_dirty(p);
|
||||
}
|
||||
|
||||
bool PSCardTable::is_in_young(const void* p) const {
|
||||
|
||||
@ -63,11 +63,6 @@ class PSCardTable: public CardTable {
|
||||
HeapWord* const start,
|
||||
HeapWord* const end);
|
||||
|
||||
enum ExtendedCardValue {
|
||||
youngergen_card = CT_MR_BS_last_reserved + 1,
|
||||
verify_card = CT_MR_BS_last_reserved + 5
|
||||
};
|
||||
|
||||
void scan_obj_with_limit(PSPromotionManager* pm,
|
||||
oop obj,
|
||||
HeapWord* start,
|
||||
@ -77,9 +72,6 @@ class PSCardTable: public CardTable {
|
||||
PSCardTable(MemRegion whole_heap) : CardTable(whole_heap),
|
||||
_preprocessing_active_workers(0) {}
|
||||
|
||||
static CardValue youngergen_card_val() { return youngergen_card; }
|
||||
static CardValue verify_card_val() { return verify_card; }
|
||||
|
||||
// Scavenge support
|
||||
void pre_scavenge(HeapWord* old_gen_bottom, uint active_workers);
|
||||
// Scavenge contents of stripes with the given index.
|
||||
@ -92,29 +84,15 @@ class PSCardTable: public CardTable {
|
||||
|
||||
bool addr_is_marked_imprecise(void *addr);
|
||||
|
||||
void set_card_newgen(void* addr) { CardValue* p = byte_for(addr); *p = verify_card; }
|
||||
|
||||
// Testers for entries
|
||||
static bool card_is_dirty(int value) { return value == dirty_card; }
|
||||
static bool card_is_newgen(int value) { return value == youngergen_card; }
|
||||
static bool card_is_clean(int value) { return value == clean_card; }
|
||||
static bool card_is_verify(int value) { return value == verify_card; }
|
||||
|
||||
// Card marking
|
||||
void inline_write_ref_field_gc(void* field) {
|
||||
CardValue* byte = byte_for(field);
|
||||
*byte = youngergen_card;
|
||||
*byte = dirty_card_val();
|
||||
}
|
||||
|
||||
// ReduceInitialCardMarks support
|
||||
bool is_in_young(const void* p) const override;
|
||||
|
||||
#ifdef ASSERT
|
||||
bool is_valid_card_address(CardValue* addr) {
|
||||
return (addr >= _byte_map) && (addr < _byte_map + _byte_map_size);
|
||||
}
|
||||
#endif // ASSERT
|
||||
|
||||
// Verification
|
||||
void verify_all_young_refs_imprecise();
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user