1.1 --- a/src/share/vm/code/codeCache.cpp Thu May 20 01:34:22 2010 -0700 1.2 +++ b/src/share/vm/code/codeCache.cpp Thu May 20 06:34:23 2010 -0700 1.3 @@ -74,12 +74,12 @@ 1.4 total_size += cb->size(); 1.5 header_size += cb->header_size(); 1.6 relocation_size += cb->relocation_size(); 1.7 - scopes_oop_size += cb->oops_size(); 1.8 if (cb->is_nmethod()) { 1.9 - nmethod *nm = (nmethod*)cb; 1.10 + nmethod* nm = cb->as_nmethod_or_null(); 1.11 code_size += nm->code_size(); 1.12 stub_size += nm->stub_size(); 1.13 1.14 + scopes_oop_size += nm->oops_size(); 1.15 scopes_data_size += nm->scopes_data_size(); 1.16 scopes_pcs_size += nm->scopes_pcs_size(); 1.17 } else { 1.18 @@ -262,14 +262,14 @@ 1.19 } 1.20 1.21 1.22 -// Mark code blobs for unloading if they contain otherwise 1.23 -// unreachable oops. 1.24 +// Mark nmethods for unloading if they contain otherwise unreachable 1.25 +// oops. 1.26 void CodeCache::do_unloading(BoolObjectClosure* is_alive, 1.27 OopClosure* keep_alive, 1.28 bool unloading_occurred) { 1.29 assert_locked_or_safepoint(CodeCache_lock); 1.30 - FOR_ALL_ALIVE_BLOBS(cb) { 1.31 - cb->do_unloading(is_alive, keep_alive, unloading_occurred); 1.32 + FOR_ALL_ALIVE_NMETHODS(nm) { 1.33 + nm->do_unloading(is_alive, keep_alive, unloading_occurred); 1.34 } 1.35 } 1.36 1.37 @@ -509,9 +509,9 @@ 1.38 if (needs_cache_clean()) { 1.39 nm->cleanup_inline_caches(); 1.40 } 1.41 - debug_only(nm->verify();) 1.42 + DEBUG_ONLY(nm->verify()); 1.43 + nm->fix_oop_relocations(); 1.44 } 1.45 - cb->fix_oop_relocations(); 1.46 } 1.47 set_needs_cache_clean(false); 1.48 prune_scavenge_root_nmethods();