8325635: Serial: Inline verify_used_region_at_save_marks
Reviewed-by: stefank, tschatzl
This commit is contained in:
parent
b356fee5d8
commit
62a4be03cf
src/hotspot/share/gc/serial
@ -32,27 +32,20 @@
|
||||
#include "utilities/align.hpp"
|
||||
|
||||
void CardTableRS::scan_old_to_young_refs(TenuredSpace* sp) {
|
||||
verify_used_region_at_save_marks(sp);
|
||||
|
||||
const MemRegion ur = sp->used_region();
|
||||
const MemRegion urasm = sp->used_region_at_save_marks();
|
||||
if (!urasm.is_empty()) {
|
||||
OldGenScanClosure cl(SerialHeap::heap()->young_gen());
|
||||
non_clean_card_iterate(sp, urasm, &cl);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
void CardTableRS::verify_used_region_at_save_marks(Space* sp) const {
|
||||
MemRegion ur = sp->used_region();
|
||||
MemRegion urasm = sp->used_region_at_save_marks();
|
||||
|
||||
assert(ur.contains(urasm),
|
||||
"Did you forget to call save_marks()? "
|
||||
"[" PTR_FORMAT ", " PTR_FORMAT ") is not contained in "
|
||||
"[" PTR_FORMAT ", " PTR_FORMAT ")",
|
||||
p2i(urasm.start()), p2i(urasm.end()), p2i(ur.start()), p2i(ur.end()));
|
||||
|
||||
if (!urasm.is_empty()) {
|
||||
OldGenScanClosure cl(SerialHeap::heap()->young_gen());
|
||||
non_clean_card_iterate(sp, urasm, &cl);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void CardTableRS::maintain_old_to_young_invariant(TenuredGeneration* old_gen,
|
||||
bool is_young_gen_empty) {
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "oops/oop.hpp"
|
||||
|
||||
class OldGenScanClosure;
|
||||
class Space;
|
||||
class TenuredGeneration;
|
||||
class TenuredSpace;
|
||||
|
||||
@ -63,8 +62,6 @@ public:
|
||||
|
||||
void scan_old_to_young_refs(TenuredSpace* sp);
|
||||
|
||||
virtual void verify_used_region_at_save_marks(Space* sp) const NOT_DEBUG_RETURN;
|
||||
|
||||
void inline_write_ref_field_gc(void* field) {
|
||||
CardValue* byte = byte_for(field);
|
||||
*byte = dirty_card_val();
|
||||
|
Loading…
x
Reference in New Issue
Block a user