提交 fc9a358e 编写于 作者: B brutisso

4988100: oop_verify_old_oop appears to be dead

Summary: removed oop_verify_old_oop and allow_dirty. Also reviewed by: alexlamsl@gmail.com
Reviewed-by: jmasa, jwilhelm
上级 dd643c7f
/*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -2444,7 +2444,7 @@ class VerifyAllOopsClosure: public OopClosure {
virtual void do_oop(narrowOop* p) { VerifyAllOopsClosure::do_oop_work(p); }
};
void CompactibleFreeListSpace::verify(bool ignored) const {
void CompactibleFreeListSpace::verify() const {
assert_lock_strong(&_freelistLock);
verify_objects_initialized();
MemRegion span = _collector->_span;
......
/*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -492,7 +492,7 @@ class CompactibleFreeListSpace: public CompactibleSpace {
void print() const;
void print_on(outputStream* st) const;
void prepare_for_verify();
void verify(bool allow_dirty) const;
void verify() const;
void verifyFreeLists() const PRODUCT_RETURN;
void verifyIndexedFreeLists() const;
void verifyIndexedFreeList(size_t size) const;
......
......@@ -3109,21 +3109,21 @@ ConcurrentMarkSweepGeneration::prepare_for_verify() {
}
void
ConcurrentMarkSweepGeneration::verify(bool allow_dirty /* ignored */) {
ConcurrentMarkSweepGeneration::verify() {
// Locks are normally acquired/released in gc_prologue/gc_epilogue, but those
// are not called when the heap is verified during universe initialization and
// at vm shutdown.
if (freelistLock()->owned_by_self()) {
cmsSpace()->verify(false /* ignored */);
cmsSpace()->verify();
} else {
MutexLockerEx fll(freelistLock(), Mutex::_no_safepoint_check_flag);
cmsSpace()->verify(false /* ignored */);
cmsSpace()->verify();
}
}
void CMSCollector::verify(bool allow_dirty /* ignored */) {
_cmsGen->verify(allow_dirty);
_permGen->verify(allow_dirty);
void CMSCollector::verify() {
_cmsGen->verify();
_permGen->verify();
}
#ifndef PRODUCT
......
/*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -988,7 +988,7 @@ class CMSCollector: public CHeapObj {
CMSGCAdaptivePolicyCounters* gc_adaptive_policy_counters();
// debugging
void verify(bool);
void verify();
bool verify_after_remark();
void verify_ok_to_terminate() const PRODUCT_RETURN;
void verify_work_stacks_empty() const PRODUCT_RETURN;
......@@ -1279,7 +1279,7 @@ class ConcurrentMarkSweepGeneration: public CardGeneration {
// Debugging
void prepare_for_verify();
void verify(bool allow_dirty);
void verify();
void print_statistics() PRODUCT_RETURN;
// Performance Counters support
......
......@@ -1120,8 +1120,7 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
HandleMark hm; // handle scope
gclog_or_tty->print(" VerifyDuringGC:(before)");
Universe::heap()->prepare_for_verify();
Universe::verify(/* allow dirty */ true,
/* silent */ false,
Universe::verify(/* silent */ false,
/* option */ VerifyOption_G1UsePrevMarking);
}
......@@ -1160,8 +1159,7 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
HandleMark hm; // handle scope
gclog_or_tty->print(" VerifyDuringGC:(after)");
Universe::heap()->prepare_for_verify();
Universe::verify(/* allow dirty */ true,
/* silent */ false,
Universe::verify(/* silent */ false,
/* option */ VerifyOption_G1UseNextMarking);
}
assert(!restart_for_overflow(), "sanity");
......@@ -1950,8 +1948,7 @@ void ConcurrentMark::cleanup() {
HandleMark hm; // handle scope
gclog_or_tty->print(" VerifyDuringGC:(before)");
Universe::heap()->prepare_for_verify();
Universe::verify(/* allow dirty */ true,
/* silent */ false,
Universe::verify(/* silent */ false,
/* option */ VerifyOption_G1UsePrevMarking);
}
......@@ -2132,8 +2129,7 @@ void ConcurrentMark::cleanup() {
HandleMark hm; // handle scope
gclog_or_tty->print(" VerifyDuringGC:(after)");
Universe::heap()->prepare_for_verify();
Universe::verify(/* allow dirty */ true,
/* silent */ false,
Universe::verify(/* silent */ false,
/* option */ VerifyOption_G1UsePrevMarking);
}
......
......@@ -1291,8 +1291,7 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
HandleMark hm; // Discard invalid handles created during verification
gclog_or_tty->print(" VerifyBeforeGC:");
prepare_for_verify();
Universe::verify(/* allow dirty */ true,
/* silent */ false,
Universe::verify(/* silent */ false,
/* option */ VerifyOption_G1UsePrevMarking);
}
......@@ -1366,8 +1365,7 @@ bool G1CollectedHeap::do_collection(bool explicit_gc,
HandleMark hm; // Discard invalid handles created during verification
gclog_or_tty->print(" VerifyAfterGC:");
prepare_for_verify();
Universe::verify(/* allow dirty */ false,
/* silent */ false,
Universe::verify(/* silent */ false,
/* option */ VerifyOption_G1UsePrevMarking);
}
......@@ -3036,7 +3034,6 @@ public:
class VerifyRegionClosure: public HeapRegionClosure {
private:
bool _allow_dirty;
bool _par;
VerifyOption _vo;
bool _failures;
......@@ -3044,9 +3041,8 @@ public:
// _vo == UsePrevMarking -> use "prev" marking information,
// _vo == UseNextMarking -> use "next" marking information,
// _vo == UseMarkWord -> use mark word from object header.
VerifyRegionClosure(bool allow_dirty, bool par, VerifyOption vo)
: _allow_dirty(allow_dirty),
_par(par),
VerifyRegionClosure(bool par, VerifyOption vo)
: _par(par),
_vo(vo),
_failures(false) {}
......@@ -3059,7 +3055,7 @@ public:
"Should be unclaimed at verify points.");
if (!r->continuesHumongous()) {
bool failures = false;
r->verify(_allow_dirty, _vo, &failures);
r->verify(_vo, &failures);
if (failures) {
_failures = true;
} else {
......@@ -3127,7 +3123,6 @@ public:
class G1ParVerifyTask: public AbstractGangTask {
private:
G1CollectedHeap* _g1h;
bool _allow_dirty;
VerifyOption _vo;
bool _failures;
......@@ -3135,10 +3130,9 @@ public:
// _vo == UsePrevMarking -> use "prev" marking information,
// _vo == UseNextMarking -> use "next" marking information,
// _vo == UseMarkWord -> use mark word from object header.
G1ParVerifyTask(G1CollectedHeap* g1h, bool allow_dirty, VerifyOption vo) :
G1ParVerifyTask(G1CollectedHeap* g1h, VerifyOption vo) :
AbstractGangTask("Parallel verify task"),
_g1h(g1h),
_allow_dirty(allow_dirty),
_vo(vo),
_failures(false) { }
......@@ -3148,7 +3142,7 @@ public:
void work(uint worker_id) {
HandleMark hm;
VerifyRegionClosure blk(_allow_dirty, true, _vo);
VerifyRegionClosure blk(true, _vo);
_g1h->heap_region_par_iterate_chunked(&blk, worker_id,
_g1h->workers()->active_workers(),
HeapRegion::ParVerifyClaimValue);
......@@ -3158,12 +3152,11 @@ public:
}
};
void G1CollectedHeap::verify(bool allow_dirty, bool silent) {
verify(allow_dirty, silent, VerifyOption_G1UsePrevMarking);
void G1CollectedHeap::verify(bool silent) {
verify(silent, VerifyOption_G1UsePrevMarking);
}
void G1CollectedHeap::verify(bool allow_dirty,
bool silent,
void G1CollectedHeap::verify(bool silent,
VerifyOption vo) {
if (SafepointSynchronize::is_at_safepoint() || ! UseTLAB) {
if (!silent) { gclog_or_tty->print("Roots (excluding permgen) "); }
......@@ -3215,7 +3208,7 @@ void G1CollectedHeap::verify(bool allow_dirty,
assert(check_heap_region_claim_values(HeapRegion::InitialClaimValue),
"sanity check");
G1ParVerifyTask task(this, allow_dirty, vo);
G1ParVerifyTask task(this, vo);
assert(UseDynamicNumberOfGCThreads ||
workers()->active_workers() == workers()->total_workers(),
"If not dynamic should be using all the workers");
......@@ -3237,7 +3230,7 @@ void G1CollectedHeap::verify(bool allow_dirty,
assert(check_heap_region_claim_values(HeapRegion::InitialClaimValue),
"sanity check");
} else {
VerifyRegionClosure blk(allow_dirty, false, vo);
VerifyRegionClosure blk(false, vo);
heap_region_iterate(&blk);
if (blk.failures()) {
failures = true;
......@@ -3650,8 +3643,7 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
HandleMark hm; // Discard invalid handles created during verification
gclog_or_tty->print(" VerifyBeforeGC:");
prepare_for_verify();
Universe::verify(/* allow dirty */ false,
/* silent */ false,
Universe::verify(/* silent */ false,
/* option */ VerifyOption_G1UsePrevMarking);
}
......@@ -3895,8 +3887,7 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
HandleMark hm; // Discard invalid handles created during verification
gclog_or_tty->print(" VerifyAfterGC:");
prepare_for_verify();
Universe::verify(/* allow dirty */ true,
/* silent */ false,
Universe::verify(/* silent */ false,
/* option */ VerifyOption_G1UsePrevMarking);
}
......
......@@ -1504,10 +1504,10 @@ public:
// Currently there is only one place where this is called with
// vo == UseMarkWord, which is to verify the marking during a
// full GC.
void verify(bool allow_dirty, bool silent, VerifyOption vo);
void verify(bool silent, VerifyOption vo);
// Override; it uses the "prev" marking information
virtual void verify(bool allow_dirty, bool silent);
virtual void verify(bool silent);
virtual void print_on(outputStream* st) const;
virtual void print_extended_on(outputStream* st) const;
......
......@@ -193,8 +193,7 @@ void G1MarkSweep::mark_sweep_phase1(bool& marked_for_unloading,
// fail. At the end of the GC, the orginal mark word values
// (including hash values) are restored to the appropriate
// objects.
Universe::heap()->verify(/* allow dirty */ true,
/* silent */ false,
Universe::heap()->verify(/* silent */ false,
/* option */ VerifyOption_G1UseMarkWord);
G1CollectedHeap* g1h = G1CollectedHeap::heap();
......
......@@ -779,16 +779,15 @@ void HeapRegion::print_on(outputStream* st) const {
G1OffsetTableContigSpace::print_on(st);
}
void HeapRegion::verify(bool allow_dirty) const {
void HeapRegion::verify() const {
bool dummy = false;
verify(allow_dirty, VerifyOption_G1UsePrevMarking, /* failures */ &dummy);
verify(VerifyOption_G1UsePrevMarking, /* failures */ &dummy);
}
// This really ought to be commoned up into OffsetTableContigSpace somehow.
// We would need a mechanism to make that code skip dead objects.
void HeapRegion::verify(bool allow_dirty,
VerifyOption vo,
void HeapRegion::verify(VerifyOption vo,
bool* failures) const {
G1CollectedHeap* g1 = G1CollectedHeap::heap();
*failures = false;
......
......@@ -823,10 +823,10 @@ class HeapRegion: public G1OffsetTableContigSpace {
// Currently there is only one place where this is called with
// vo == UseMarkWord, which is to verify the marking during a
// full GC.
void verify(bool allow_dirty, VerifyOption vo, bool *failures) const;
void verify(VerifyOption vo, bool *failures) const;
// Override; it uses the "prev" marking information
virtual void verify(bool allow_dirty) const;
virtual void verify() const;
};
// HeapRegionClosure is used for iterating over regions.
......
......@@ -911,23 +911,23 @@ void ParallelScavengeHeap::print_tracing_info() const {
}
void ParallelScavengeHeap::verify(bool allow_dirty, bool silent, VerifyOption option /* ignored */) {
void ParallelScavengeHeap::verify(bool silent, VerifyOption option /* ignored */) {
// Why do we need the total_collections()-filter below?
if (total_collections() > 0) {
if (!silent) {
gclog_or_tty->print("permanent ");
}
perm_gen()->verify(allow_dirty);
perm_gen()->verify();
if (!silent) {
gclog_or_tty->print("tenured ");
}
old_gen()->verify(allow_dirty);
old_gen()->verify();
if (!silent) {
gclog_or_tty->print("eden ");
}
young_gen()->verify(allow_dirty);
young_gen()->verify();
}
}
......
......@@ -257,7 +257,7 @@ CollectorPolicy* collector_policy() const { return (CollectorPolicy*) _collector
virtual void gc_threads_do(ThreadClosure* tc) const;
virtual void print_tracing_info() const;
void verify(bool allow_dirty, bool silent, VerifyOption option /* ignored */);
void verify(bool silent, VerifyOption option /* ignored */);
void print_heap_change(size_t prev_used);
......
/*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -477,8 +477,8 @@ void PSOldGen::space_invariants() {
}
#endif
void PSOldGen::verify(bool allow_dirty) {
object_space()->verify(allow_dirty);
void PSOldGen::verify() {
object_space()->verify();
}
class VerifyObjectStartArrayClosure : public ObjectClosure {
PSOldGen* _gen;
......
/*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -174,7 +174,7 @@ class PSOldGen : public CHeapObj {
virtual void print_on(outputStream* st) const;
void print_used_change(size_t prev_used) const;
void verify(bool allow_dirty);
void verify();
void verify_object_start_array();
// These should not used
......
/*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -937,10 +937,10 @@ void PSYoungGen::update_counters() {
}
}
void PSYoungGen::verify(bool allow_dirty) {
eden_space()->verify(allow_dirty);
from_space()->verify(allow_dirty);
to_space()->verify(allow_dirty);
void PSYoungGen::verify() {
eden_space()->verify();
from_space()->verify();
to_space()->verify();
}
#ifndef PRODUCT
......
/*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -181,7 +181,7 @@ class PSYoungGen : public CHeapObj {
void print_used_change(size_t prev_used) const;
virtual const char* name() const { return "PSYoungGen"; }
void verify(bool allow_dirty);
void verify();
// Space boundary invariant checker
void space_invariants() PRODUCT_RETURN;
......
/*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -70,7 +70,7 @@ void ImmutableSpace::print() const {
#endif
void ImmutableSpace::verify(bool allow_dirty) {
void ImmutableSpace::verify() {
HeapWord* p = bottom();
HeapWord* t = end();
HeapWord* prev_p = NULL;
......
/*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -65,7 +65,7 @@ class ImmutableSpace: public CHeapObj {
// Debugging
virtual void print() const PRODUCT_RETURN;
virtual void print_short() const PRODUCT_RETURN;
virtual void verify(bool allow_dirty);
virtual void verify();
};
#endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_IMMUTABLESPACE_HPP
......@@ -891,12 +891,12 @@ void MutableNUMASpace::print_on(outputStream* st) const {
}
}
void MutableNUMASpace::verify(bool allow_dirty) {
void MutableNUMASpace::verify() {
// This can be called after setting an arbitary value to the space's top,
// so an object can cross the chunk boundary. We ensure the parsablity
// of the space and just walk the objects in linear fashion.
ensure_parsability();
MutableSpace::verify(allow_dirty);
MutableSpace::verify();
}
// Scan pages and gather stats about page placement and size.
......
/*
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -225,7 +225,7 @@ class MutableNUMASpace : public MutableSpace {
// Debugging
virtual void print_on(outputStream* st) const;
virtual void print_short_on(outputStream* st) const;
virtual void verify(bool allow_dirty);
virtual void verify();
virtual void set_top(HeapWord* value);
};
......
/*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -246,7 +246,7 @@ void MutableSpace::print_on(outputStream* st) const {
bottom(), top(), end());
}
void MutableSpace::verify(bool allow_dirty) {
void MutableSpace::verify() {
HeapWord* p = bottom();
HeapWord* t = top();
HeapWord* prev_p = NULL;
......
/*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -141,7 +141,7 @@ class MutableSpace: public ImmutableSpace {
virtual void print_on(outputStream* st) const;
virtual void print_short() const;
virtual void print_short_on(outputStream* st) const;
virtual void verify(bool allow_dirty);
virtual void verify();
};
#endif // SHARE_VM_GC_IMPLEMENTATION_SHARED_MUTABLESPACE_HPP
......@@ -659,7 +659,7 @@ class CollectedHeap : public CHeapObj {
}
// Heap verification
virtual void verify(bool allow_dirty, bool silent, VerifyOption option) = 0;
virtual void verify(bool silent, VerifyOption option) = 0;
// Non product verification and debugging.
#ifndef PRODUCT
......
......@@ -444,11 +444,11 @@ void CompactingPermGenGen::invalidate_remembered_set() {
}
void CompactingPermGenGen::verify(bool allow_dirty) {
the_space()->verify(allow_dirty);
void CompactingPermGenGen::verify() {
the_space()->verify();
if (!SharedSkipVerify && spec()->enable_shared_spaces()) {
ro_space()->verify(allow_dirty);
rw_space()->verify(allow_dirty);
ro_space()->verify();
rw_space()->verify();
}
}
......
/*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -230,7 +230,7 @@ public:
void* new_vtable_start,
void* obj);
void verify(bool allow_dirty);
void verify();
// Serialization
static void initialize_oops() KERNEL_RETURN;
......
......@@ -939,10 +939,10 @@ void DefNewGeneration::update_counters() {
}
}
void DefNewGeneration::verify(bool allow_dirty) {
eden()->verify(allow_dirty);
from()->verify(allow_dirty);
to()->verify(allow_dirty);
void DefNewGeneration::verify() {
eden()->verify();
from()->verify();
to()->verify();
}
void DefNewGeneration::print_on(outputStream* st) const {
......
/*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -340,7 +340,7 @@ protected:
// PrintHeapAtGC support.
void print_on(outputStream* st) const;
void verify(bool allow_dirty);
void verify();
bool promo_failure_scan_is_complete() const {
return _promo_failure_scan_stack.is_empty();
......
......@@ -1247,18 +1247,18 @@ GCStats* GenCollectedHeap::gc_stats(int level) const {
return _gens[level]->gc_stats();
}
void GenCollectedHeap::verify(bool allow_dirty, bool silent, VerifyOption option /* ignored */) {
void GenCollectedHeap::verify(bool silent, VerifyOption option /* ignored */) {
if (!silent) {
gclog_or_tty->print("permgen ");
}
perm_gen()->verify(allow_dirty);
perm_gen()->verify();
for (int i = _n_gens-1; i >= 0; i--) {
Generation* g = _gens[i];
if (!silent) {
gclog_or_tty->print(g->name());
gclog_or_tty->print(" ");
}
g->verify(allow_dirty);
g->verify();
}
if (!silent) {
gclog_or_tty->print("remset ");
......
/*
* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -357,7 +357,7 @@ public:
void prepare_for_verify();
// Override.
void verify(bool allow_dirty, bool silent, VerifyOption option);
void verify(bool silent, VerifyOption option);
// Override.
virtual void print_on(outputStream* st) const;
......
/*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -696,8 +696,8 @@ void OneContigSpaceCardGeneration::record_spaces_top() {
the_space()->set_top_for_allocations();
}
void OneContigSpaceCardGeneration::verify(bool allow_dirty) {
the_space()->verify(allow_dirty);
void OneContigSpaceCardGeneration::verify() {
the_space()->verify();
}
void OneContigSpaceCardGeneration::print_on(outputStream* st) const {
......
/*
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -599,7 +599,7 @@ class Generation: public CHeapObj {
virtual void print() const;
virtual void print_on(outputStream* st) const;
virtual void verify(bool allow_dirty) = 0;
virtual void verify() = 0;
struct StatRecord {
int invocations;
......@@ -753,7 +753,7 @@ class OneContigSpaceCardGeneration: public CardGeneration {
virtual void record_spaces_top();
virtual void verify(bool allow_dirty);
virtual void verify();
virtual void print_on(outputStream* st) const;
};
......
/*
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -531,7 +531,7 @@ void OffsetTableContigSpace::print_on(outputStream* st) const {
bottom(), top(), _offsets.threshold(), end());
}
void ContiguousSpace::verify(bool allow_dirty) const {
void ContiguousSpace::verify() const {
HeapWord* p = bottom();
HeapWord* t = top();
HeapWord* prev_p = NULL;
......@@ -965,27 +965,12 @@ OffsetTableContigSpace::OffsetTableContigSpace(BlockOffsetSharedArray* sharedOff
initialize(mr, SpaceDecorator::Clear, SpaceDecorator::Mangle);
}
class VerifyOldOopClosure : public OopClosure {
public:
oop _the_obj;
bool _allow_dirty;
void do_oop(oop* p) {
_the_obj->verify_old_oop(p, _allow_dirty);
}
void do_oop(narrowOop* p) {
_the_obj->verify_old_oop(p, _allow_dirty);
}
};
#define OBJ_SAMPLE_INTERVAL 0
#define BLOCK_SAMPLE_INTERVAL 100
void OffsetTableContigSpace::verify(bool allow_dirty) const {
void OffsetTableContigSpace::verify() const {
HeapWord* p = bottom();
HeapWord* prev_p = NULL;
VerifyOldOopClosure blk; // Does this do anything?
blk._allow_dirty = allow_dirty;
int objs = 0;
int blocks = 0;
......@@ -1007,8 +992,6 @@ void OffsetTableContigSpace::verify(bool allow_dirty) const {
if (objs == OBJ_SAMPLE_INTERVAL) {
oop(p)->verify();
blk._the_obj = oop(p);
oop(p)->oop_iterate(&blk);
objs = 0;
} else {
objs++;
......
/*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -306,7 +306,7 @@ class Space: public CHeapObj {
}
// Debugging
virtual void verify(bool allow_dirty) const = 0;
virtual void verify() const = 0;
};
// A MemRegionClosure (ResourceObj) whose "do_MemRegion" function applies an
......@@ -948,7 +948,7 @@ class ContiguousSpace: public CompactibleSpace {
}
// Debugging
virtual void verify(bool allow_dirty) const;
virtual void verify() const;
// Used to increase collection frequency. "factor" of 0 means entire
// space.
......@@ -1100,7 +1100,7 @@ class OffsetTableContigSpace: public ContiguousSpace {
virtual void print_on(outputStream* st) const;
// Debugging
void verify(bool allow_dirty) const;
void verify() const;
// Shared space support
void serialize_block_offset_array_offsets(SerializeOopClosure* soc);
......
/*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -1326,7 +1326,7 @@ void Universe::print_heap_after_gc(outputStream* st, bool ignore_extended) {
st->print_cr("}");
}
void Universe::verify(bool allow_dirty, bool silent, VerifyOption option) {
void Universe::verify(bool silent, VerifyOption option) {
if (SharedSkipVerify) {
return;
}
......@@ -1350,7 +1350,7 @@ void Universe::verify(bool allow_dirty, bool silent, VerifyOption option) {
if (!silent) gclog_or_tty->print("[Verifying ");
if (!silent) gclog_or_tty->print("threads ");
Threads::verify();
heap()->verify(allow_dirty, silent, option);
heap()->verify(silent, option);
if (!silent) gclog_or_tty->print("syms ");
SymbolTable::verify();
......
/*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -412,7 +412,7 @@ class Universe: AllStatic {
// Debugging
static bool verify_in_progress() { return _verify_in_progress; }
static void verify(bool allow_dirty = true, bool silent = false,
static void verify(bool silent = false,
VerifyOption option = VerifyOption_Default );
static int verify_count() { return _verify_count; }
// The default behavior is to call print_on() on gclog_or_tty.
......
/*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -497,36 +497,12 @@ void instanceRefKlass::oop_verify_on(oop obj, outputStream* st) {
if (referent != NULL) {
guarantee(referent->is_oop(), "referent field heap failed");
if (gch != NULL && !gch->is_in_young(obj)) {
// We do a specific remembered set check here since the referent
// field is not part of the oop mask and therefore skipped by the
// regular verify code.
if (UseCompressedOops) {
narrowOop* referent_addr = (narrowOop*)java_lang_ref_Reference::referent_addr(obj);
obj->verify_old_oop(referent_addr, true);
} else {
oop* referent_addr = (oop*)java_lang_ref_Reference::referent_addr(obj);
obj->verify_old_oop(referent_addr, true);
}
}
}
// Verify next field
oop next = java_lang_ref_Reference::next(obj);
if (next != NULL) {
guarantee(next->is_oop(), "next field verify failed");
guarantee(next->is_instanceRef(), "next field verify failed");
if (gch != NULL && !gch->is_in_young(obj)) {
// We do a specific remembered set check here since the next field is
// not part of the oop mask and therefore skipped by the regular
// verify code.
if (UseCompressedOops) {
narrowOop* next_addr = (narrowOop*)java_lang_ref_Reference::next_addr(obj);
obj->verify_old_oop(next_addr, true);
} else {
oop* next_addr = (oop*)java_lang_ref_Reference::next_addr(obj);
obj->verify_old_oop(next_addr, true);
}
}
}
}
......
......@@ -581,14 +581,6 @@ void Klass::oop_verify_on(oop obj, outputStream* st) {
guarantee(obj->klass()->is_klass(), "klass field is not a klass");
}
void Klass::oop_verify_old_oop(oop obj, oop* p, bool allow_dirty) {
/* $$$ I think this functionality should be handled by verification of
RememberedSet::verify_old_oop(obj, p, allow_dirty, false);
the card table. */
}
void Klass::oop_verify_old_oop(oop obj, narrowOop* p, bool allow_dirty) { }
#ifndef PRODUCT
void Klass::verify_vtable_index(int i) {
......
......@@ -805,8 +805,6 @@ class Klass : public Klass_vtbl {
// Verification
virtual const char* internal_name() const = 0;
virtual void oop_verify_on(oop obj, outputStream* st);
virtual void oop_verify_old_oop(oop obj, oop* p, bool allow_dirty);
virtual void oop_verify_old_oop(oop obj, narrowOop* p, bool allow_dirty);
// tells whether obj is partially constructed (gc during class loading)
virtual bool oop_partially_loaded(oop obj) const { return false; }
virtual void oop_set_partially_loaded(oop obj) {};
......
......@@ -545,10 +545,3 @@ void objArrayKlass::oop_verify_on(oop obj, outputStream* st) {
guarantee(oa->obj_at(index)->is_oop_or_null(), "should be oop");
}
}
void objArrayKlass::oop_verify_old_oop(oop obj, oop* p, bool allow_dirty) {
/* $$$ move into remembered set verification?
RememberedSet::verify_old_oop(obj, p, allow_dirty, true);
*/
}
void objArrayKlass::oop_verify_old_oop(oop obj, narrowOop* p, bool allow_dirty) {}
/*
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -144,8 +144,6 @@ class objArrayKlass : public arrayKlass {
// Verification
const char* internal_name() const;
void oop_verify_on(oop obj, outputStream* st);
void oop_verify_old_oop(oop obj, oop* p, bool allow_dirty);
void oop_verify_old_oop(oop obj, narrowOop* p, bool allow_dirty);
};
#endif // SHARE_VM_OOPS_OBJARRAYKLASS_HPP
/*
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -107,16 +107,6 @@ void oopDesc::verify() {
verify_on(tty);
}
// XXX verify_old_oop doesn't do anything (should we remove?)
void oopDesc::verify_old_oop(oop* p, bool allow_dirty) {
blueprint()->oop_verify_old_oop(this, p, allow_dirty);
}
void oopDesc::verify_old_oop(narrowOop* p, bool allow_dirty) {
blueprint()->oop_verify_old_oop(this, p, allow_dirty);
}
bool oopDesc::partially_loaded() {
return blueprint()->oop_partially_loaded(this);
}
......
/*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -293,8 +293,6 @@ class oopDesc {
// verification operations
void verify_on(outputStream* st);
void verify();
void verify_old_oop(oop* p, bool allow_dirty);
void verify_old_oop(narrowOop* p, bool allow_dirty);
// tells whether this oop is partially constructed (gc during class loading)
bool partially_loaded();
......
/*
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -304,7 +304,7 @@ void VMThread::run() {
os::check_heap();
// Silent verification so as not to pollute normal output,
// unless we really asked for it.
Universe::verify(true, !(PrintGCDetails || Verbose));
Universe::verify(!(PrintGCDetails || Verbose));
}
CompileBroker::set_should_block();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册