Mercurial > hg > graal-compiler
diff src/share/vm/code/nmethod.cpp @ 17915:e0a77b91da68
8040085: dtrace/jsdt tests crash on solaris. found an unadvertised bad scavengable oop in the code cache
Summary: Add CodeCache::add_scavenge_root_nmethod(this) to the dtrace-constructor of nmethod
Reviewed-by: roland, iveresov
author | anoll |
---|---|
date | Mon, 28 Apr 2014 12:39:12 +0200 |
parents | 62c54fcc0a35 |
children | 78bbf4d43a14 |
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp Fri May 02 16:44:54 2014 -0700 +++ b/src/share/vm/code/nmethod.cpp Mon Apr 28 12:39:12 2014 +0200 @@ -771,7 +771,11 @@ _hotness_counter = NMethodSweeper::hotness_counter_reset_val(); code_buffer->copy_values_to(this); - debug_only(verify_scavenge_root_oops()); + if (ScavengeRootsInCode && detect_scavenge_root_oops()) { + CodeCache::add_scavenge_root_nmethod(this); + Universe::heap()->register_nmethod(this); + } + DEBUG_ONLY(verify_scavenge_root_oops();) CodeCache::commit(this); }