8319306: Serial: Remove TenuredSpace::verify
Reviewed-by: iwalulya, tschatzl
This commit is contained in:
parent
1e687b4529
commit
cd9719bc1d
@ -371,18 +371,11 @@ void TenuredSpace::print_on(outputStream* st) const {
|
||||
void ContiguousSpace::verify() const {
|
||||
HeapWord* p = bottom();
|
||||
HeapWord* t = top();
|
||||
HeapWord* prev_p = nullptr;
|
||||
while (p < t) {
|
||||
oopDesc::verify(cast_to_oop(p));
|
||||
prev_p = p;
|
||||
p += cast_to_oop(p)->size();
|
||||
}
|
||||
guarantee(p == top(), "end of last object must match end of space");
|
||||
if (top() != end()) {
|
||||
guarantee(top() == block_start_const(end()-1) &&
|
||||
top() == block_start_const(top()),
|
||||
"top should be start of unallocated block, if it exists");
|
||||
}
|
||||
}
|
||||
|
||||
bool Space::obj_is_alive(const HeapWord* p) const {
|
||||
@ -515,40 +508,6 @@ TenuredSpace::TenuredSpace(SerialBlockOffsetSharedArray* sharedOffsetArray,
|
||||
initialize(mr, SpaceDecorator::Clear, SpaceDecorator::Mangle);
|
||||
}
|
||||
|
||||
#define OBJ_SAMPLE_INTERVAL 0
|
||||
#define BLOCK_SAMPLE_INTERVAL 100
|
||||
|
||||
void TenuredSpace::verify() const {
|
||||
HeapWord* p = bottom();
|
||||
HeapWord* prev_p = nullptr;
|
||||
int objs = 0;
|
||||
int blocks = 0;
|
||||
|
||||
while (p < top()) {
|
||||
size_t size = cast_to_oop(p)->size();
|
||||
// For a sampling of objects in the space, find it using the
|
||||
// block offset table.
|
||||
if (blocks == BLOCK_SAMPLE_INTERVAL) {
|
||||
guarantee(p == block_start_const(p + (size/2)),
|
||||
"check offset computation");
|
||||
blocks = 0;
|
||||
} else {
|
||||
blocks++;
|
||||
}
|
||||
|
||||
if (objs == OBJ_SAMPLE_INTERVAL) {
|
||||
oopDesc::verify(cast_to_oop(p));
|
||||
objs = 0;
|
||||
} else {
|
||||
objs++;
|
||||
}
|
||||
prev_p = p;
|
||||
p += size;
|
||||
}
|
||||
guarantee(p == top(), "end of last object must match end of space");
|
||||
}
|
||||
|
||||
|
||||
size_t TenuredSpace::allowed_dead_ratio() const {
|
||||
return MarkSweepDeadRatio;
|
||||
}
|
||||
|
@ -194,9 +194,6 @@ class Space: public CHeapObj<mtGC> {
|
||||
virtual void print_on(outputStream* st) const;
|
||||
void print_short() const;
|
||||
void print_short_on(outputStream* st) const;
|
||||
|
||||
// Debugging
|
||||
virtual void verify() const = 0;
|
||||
};
|
||||
|
||||
// A structure to represent a point at which objects are being copied
|
||||
@ -396,7 +393,7 @@ private:
|
||||
void print_on(outputStream* st) const override;
|
||||
|
||||
// Debugging
|
||||
void verify() const override;
|
||||
void verify() const;
|
||||
};
|
||||
|
||||
#if INCLUDE_SERIALGC
|
||||
@ -426,9 +423,6 @@ class TenuredSpace: public ContiguousSpace {
|
||||
void update_for_block(HeapWord* start, HeapWord* end) override;
|
||||
|
||||
void print_on(outputStream* st) const override;
|
||||
|
||||
// Debugging
|
||||
void verify() const override;
|
||||
};
|
||||
#endif //INCLUDE_SERIALGC
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user