# HG changeset patch # User stefank # Date 1348834465 -7200 # Node ID 15fba4382765ab14eae6d75188d289b137facb62 # Parent b86575d092a21e939f95598c259c6bcd2f880b92# Parent 7c2fd5948145dabb81e432593f9f552a74833940 Merge diff -r b86575d092a2 -r 15fba4382765 src/share/vm/code/codeCache.cpp --- a/src/share/vm/code/codeCache.cpp Thu Sep 27 20:22:57 2012 +0400 +++ b/src/share/vm/code/codeCache.cpp Fri Sep 28 14:14:25 2012 +0200 @@ -309,12 +309,10 @@ // Mark nmethods for unloading if they contain otherwise unreachable // oops. -void CodeCache::do_unloading(BoolObjectClosure* is_alive, - OopClosure* keep_alive, - bool unloading_occurred) { +void CodeCache::do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred) { assert_locked_or_safepoint(CodeCache_lock); FOR_ALL_ALIVE_NMETHODS(nm) { - nm->do_unloading(is_alive, keep_alive, unloading_occurred); + nm->do_unloading(is_alive, unloading_occurred); } } diff -r b86575d092a2 -r 15fba4382765 src/share/vm/code/codeCache.hpp --- a/src/share/vm/code/codeCache.hpp Thu Sep 27 20:22:57 2012 +0400 +++ b/src/share/vm/code/codeCache.hpp Fri Sep 28 14:14:25 2012 +0200 @@ -130,9 +130,7 @@ // If "unloading_occurred" is true, then unloads (i.e., breaks root links // to) any unmarked codeBlobs in the cache. Sets "marked_for_unloading" // to "true" iff some code got unloaded. - static void do_unloading(BoolObjectClosure* is_alive, - OopClosure* keep_alive, - bool unloading_occurred); + static void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred); static void oops_do(OopClosure* f) { CodeBlobToOopClosure oopc(f, /*do_marking=*/ false); blobs_do(&oopc); diff -r b86575d092a2 -r 15fba4382765 src/share/vm/code/nmethod.cpp --- a/src/share/vm/code/nmethod.cpp Thu Sep 27 20:22:57 2012 +0400 +++ b/src/share/vm/code/nmethod.cpp Fri Sep 28 14:14:25 2012 +0200 @@ -1472,9 +1472,7 @@ // If this oop is not live, the nmethod can be unloaded. -bool nmethod::can_unload(BoolObjectClosure* is_alive, - OopClosure* keep_alive, - oop* root, bool unloading_occurred) { +bool nmethod::can_unload(BoolObjectClosure* is_alive, oop* root, bool unloading_occurred) { assert(root != NULL, "just checking"); oop obj = *root; if (obj == NULL || is_alive->do_object_b(obj)) { @@ -1583,8 +1581,7 @@ // GC to unload an nmethod if it contains otherwise unreachable // oops. -void nmethod::do_unloading(BoolObjectClosure* is_alive, - OopClosure* keep_alive, bool unloading_occurred) { +void nmethod::do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred) { // Make sure the oop's ready to receive visitors assert(!is_zombie() && !is_unloaded(), "should not call follow on zombie or unloaded nmethod"); @@ -1672,7 +1669,7 @@ (r->oop_addr() >= oops_begin() && r->oop_addr() < oops_end()), "oop must be found in exactly one place"); if (r->oop_is_immediate() && r->oop_value() != NULL) { - if (can_unload(is_alive, keep_alive, r->oop_addr(), unloading_occurred)) { + if (can_unload(is_alive, r->oop_addr(), unloading_occurred)) { return; } } @@ -1684,7 +1681,7 @@ // Scopes for (oop* p = oops_begin(); p < oops_end(); p++) { if (*p == Universe::non_oop_word()) continue; // skip non-oops - if (can_unload(is_alive, keep_alive, p, unloading_occurred)) { + if (can_unload(is_alive, p, unloading_occurred)) { return; } } diff -r b86575d092a2 -r 15fba4382765 src/share/vm/code/nmethod.hpp --- a/src/share/vm/code/nmethod.hpp Thu Sep 27 20:22:57 2012 +0400 +++ b/src/share/vm/code/nmethod.hpp Fri Sep 28 14:14:25 2012 +0200 @@ -556,10 +556,8 @@ void set_method(Method* method) { _method = method; } // GC support - void do_unloading(BoolObjectClosure* is_alive, OopClosure* keep_alive, - bool unloading_occurred); - bool can_unload(BoolObjectClosure* is_alive, OopClosure* keep_alive, - oop* root, bool unloading_occurred); + void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred); + bool can_unload(BoolObjectClosure* is_alive, oop* root, bool unloading_occurred); void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f); diff -r b86575d092a2 -r 15fba4382765 src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Thu Sep 27 20:22:57 2012 +0400 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp Fri Sep 28 14:14:25 2012 +0200 @@ -5954,9 +5954,7 @@ bool purged_class = SystemDictionary::do_unloading(&_is_alive_closure); // Follow CodeCache roots and unload any methods marked for unloading - CodeCache::do_unloading(&_is_alive_closure, - &cmsKeepAliveClosure, - purged_class); + CodeCache::do_unloading(&_is_alive_closure, purged_class); cmsDrainMarkingStackClosure.do_void(); verify_work_stacks_empty(); diff -r b86575d092a2 -r 15fba4382765 src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp --- a/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp Thu Sep 27 20:22:57 2012 +0400 +++ b/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp Fri Sep 28 14:14:25 2012 +0200 @@ -129,7 +129,7 @@ buf.append_and_print_cr("]"); } -#ifdef ASSERT +#ifndef PRODUCT template void WorkerDataArray::reset() { diff -r b86575d092a2 -r 15fba4382765 src/share/vm/gc_implementation/g1/g1MarkSweep.cpp --- a/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp Thu Sep 27 20:22:57 2012 +0400 +++ b/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp Fri Sep 28 14:14:25 2012 +0200 @@ -151,9 +151,7 @@ // Follow code cache roots (has to be done after system dictionary, // assumes all live klasses are marked) - CodeCache::do_unloading(&GenMarkSweep::is_alive, - &GenMarkSweep::keep_alive, - purged_class); + CodeCache::do_unloading(&GenMarkSweep::is_alive, purged_class); GenMarkSweep::follow_stack(); // Update subklass/sibling/implementor links of live klasses diff -r b86575d092a2 -r 15fba4382765 src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp --- a/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp Thu Sep 27 20:22:57 2012 +0400 +++ b/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp Fri Sep 28 14:14:25 2012 +0200 @@ -521,8 +521,7 @@ bool purged_class = SystemDictionary::do_unloading(is_alive_closure()); // Follow code cache roots - CodeCache::do_unloading(is_alive_closure(), mark_and_push_closure(), - purged_class); + CodeCache::do_unloading(is_alive_closure(), purged_class); follow_stack(); // Flush marking stack // Update subklass/sibling/implementor links of live klasses diff -r b86575d092a2 -r 15fba4382765 src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp --- a/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp Thu Sep 27 20:22:57 2012 +0400 +++ b/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp Fri Sep 28 14:14:25 2012 +0200 @@ -2375,8 +2375,7 @@ bool purged_class = SystemDictionary::do_unloading(is_alive_closure()); // Follow code cache roots. - CodeCache::do_unloading(is_alive_closure(), &mark_and_push_closure, - purged_class); + CodeCache::do_unloading(is_alive_closure(), purged_class); cm->follow_marking_stacks(); // Flush marking stack. // Update subklass/sibling/implementor links of live klasses diff -r b86575d092a2 -r 15fba4382765 src/share/vm/memory/genMarkSweep.cpp --- a/src/share/vm/memory/genMarkSweep.cpp Thu Sep 27 20:22:57 2012 +0400 +++ b/src/share/vm/memory/genMarkSweep.cpp Fri Sep 28 14:14:25 2012 +0200 @@ -291,7 +291,7 @@ bool purged_class = SystemDictionary::do_unloading(&is_alive); // Follow code cache roots - CodeCache::do_unloading(&is_alive, &keep_alive, purged_class); + CodeCache::do_unloading(&is_alive, purged_class); follow_stack(); // Flush marking stack // Update subklass/sibling/implementor links of live klasses diff -r b86575d092a2 -r 15fba4382765 src/share/vm/memory/metaspace.cpp --- a/src/share/vm/memory/metaspace.cpp Thu Sep 27 20:22:57 2012 +0400 +++ b/src/share/vm/memory/metaspace.cpp Fri Sep 28 14:14:25 2012 +0200 @@ -2518,7 +2518,7 @@ " waste " SIZE_FORMAT, curr_total, used, free, capacity, waste); } -#ifndef PRODUCT +#ifdef ASSERT void SpaceManager::mangle_freed_chunks() { for (ChunkIndex index = SmallIndex; index < NumberOfFreeLists; @@ -2536,7 +2536,7 @@ } } } -#endif // PRODUCT +#endif // ASSERT // MetaspaceAux