Mon, 23 Jun 2014 16:43:41 +0200
8046231: G1: Code root location ... from nmethod ... not in strong code roots for region
Reviewed-by: tschatzl, ehelin
src/share/vm/code/nmethod.cpp | file | annotate | diff | comparison | revisions | |
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/vm/code/nmethod.cpp Thu Jun 19 13:31:14 2014 +0200 1.2 +++ b/src/share/vm/code/nmethod.cpp Mon Jun 23 16:43:41 2014 +0200 1.3 @@ -688,8 +688,10 @@ 1.4 _hotness_counter = NMethodSweeper::hotness_counter_reset_val(); 1.5 1.6 code_buffer->copy_values_to(this); 1.7 - if (ScavengeRootsInCode && detect_scavenge_root_oops()) { 1.8 - CodeCache::add_scavenge_root_nmethod(this); 1.9 + if (ScavengeRootsInCode) { 1.10 + if (detect_scavenge_root_oops()) { 1.11 + CodeCache::add_scavenge_root_nmethod(this); 1.12 + } 1.13 Universe::heap()->register_nmethod(this); 1.14 } 1.15 debug_only(verify_scavenge_root_oops()); 1.16 @@ -773,8 +775,10 @@ 1.17 _hotness_counter = NMethodSweeper::hotness_counter_reset_val(); 1.18 1.19 code_buffer->copy_values_to(this); 1.20 - if (ScavengeRootsInCode && detect_scavenge_root_oops()) { 1.21 - CodeCache::add_scavenge_root_nmethod(this); 1.22 + if (ScavengeRootsInCode) { 1.23 + if (detect_scavenge_root_oops()) { 1.24 + CodeCache::add_scavenge_root_nmethod(this); 1.25 + } 1.26 Universe::heap()->register_nmethod(this); 1.27 } 1.28 DEBUG_ONLY(verify_scavenge_root_oops();) 1.29 @@ -889,8 +893,10 @@ 1.30 code_buffer->copy_values_to(this); 1.31 debug_info->copy_to(this); 1.32 dependencies->copy_to(this); 1.33 - if (ScavengeRootsInCode && detect_scavenge_root_oops()) { 1.34 - CodeCache::add_scavenge_root_nmethod(this); 1.35 + if (ScavengeRootsInCode) { 1.36 + if (detect_scavenge_root_oops()) { 1.37 + CodeCache::add_scavenge_root_nmethod(this); 1.38 + } 1.39 Universe::heap()->register_nmethod(this); 1.40 } 1.41 debug_only(verify_scavenge_root_oops());
2.1 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Thu Jun 19 13:31:14 2014 +0200 2.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp Mon Jun 23 16:43:41 2014 +0200 2.3 @@ -6950,7 +6950,7 @@ 2.4 return; 2.5 } 2.6 2.7 - if (ScavengeRootsInCode && nm->detect_scavenge_root_oops()) { 2.8 + if (ScavengeRootsInCode) { 2.9 _g1h->register_nmethod(nm); 2.10 } 2.11 }