comparison src/share/vm/code/nmethod.cpp @ 20191:fd81a5764900

8046231: G1: Code root location ... from nmethod ... not in strong code roots for region Reviewed-by: tschatzl, ehelin
author pliden
date Mon, 23 Jun 2014 16:43:41 +0200
parents 78bbf4d43a14
children ce8f6bb717c9
comparison
equal deleted inserted replaced
20190:0982ec23da03 20191:fd81a5764900
686 _exception_cache = NULL; 686 _exception_cache = NULL;
687 _pc_desc_cache.reset_to(NULL); 687 _pc_desc_cache.reset_to(NULL);
688 _hotness_counter = NMethodSweeper::hotness_counter_reset_val(); 688 _hotness_counter = NMethodSweeper::hotness_counter_reset_val();
689 689
690 code_buffer->copy_values_to(this); 690 code_buffer->copy_values_to(this);
691 if (ScavengeRootsInCode && detect_scavenge_root_oops()) { 691 if (ScavengeRootsInCode) {
692 CodeCache::add_scavenge_root_nmethod(this); 692 if (detect_scavenge_root_oops()) {
693 CodeCache::add_scavenge_root_nmethod(this);
694 }
693 Universe::heap()->register_nmethod(this); 695 Universe::heap()->register_nmethod(this);
694 } 696 }
695 debug_only(verify_scavenge_root_oops()); 697 debug_only(verify_scavenge_root_oops());
696 CodeCache::commit(this); 698 CodeCache::commit(this);
697 } 699 }
771 _exception_cache = NULL; 773 _exception_cache = NULL;
772 _pc_desc_cache.reset_to(NULL); 774 _pc_desc_cache.reset_to(NULL);
773 _hotness_counter = NMethodSweeper::hotness_counter_reset_val(); 775 _hotness_counter = NMethodSweeper::hotness_counter_reset_val();
774 776
775 code_buffer->copy_values_to(this); 777 code_buffer->copy_values_to(this);
776 if (ScavengeRootsInCode && detect_scavenge_root_oops()) { 778 if (ScavengeRootsInCode) {
777 CodeCache::add_scavenge_root_nmethod(this); 779 if (detect_scavenge_root_oops()) {
780 CodeCache::add_scavenge_root_nmethod(this);
781 }
778 Universe::heap()->register_nmethod(this); 782 Universe::heap()->register_nmethod(this);
779 } 783 }
780 DEBUG_ONLY(verify_scavenge_root_oops();) 784 DEBUG_ONLY(verify_scavenge_root_oops();)
781 CodeCache::commit(this); 785 CodeCache::commit(this);
782 } 786 }
887 891
888 // Copy contents of ScopeDescRecorder to nmethod 892 // Copy contents of ScopeDescRecorder to nmethod
889 code_buffer->copy_values_to(this); 893 code_buffer->copy_values_to(this);
890 debug_info->copy_to(this); 894 debug_info->copy_to(this);
891 dependencies->copy_to(this); 895 dependencies->copy_to(this);
892 if (ScavengeRootsInCode && detect_scavenge_root_oops()) { 896 if (ScavengeRootsInCode) {
893 CodeCache::add_scavenge_root_nmethod(this); 897 if (detect_scavenge_root_oops()) {
898 CodeCache::add_scavenge_root_nmethod(this);
899 }
894 Universe::heap()->register_nmethod(this); 900 Universe::heap()->register_nmethod(this);
895 } 901 }
896 debug_only(verify_scavenge_root_oops()); 902 debug_only(verify_scavenge_root_oops());
897 903
898 CodeCache::commit(this); 904 CodeCache::commit(this);