mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8040085: dtrace/jsdt tests crash on solaris. found an unadvertised bad scavengable oop in the code cache
Add CodeCache::add_scavenge_root_nmethod(this) to the dtrace-constructor of nmethod Reviewed-by: roland, iveresov
This commit is contained in:
parent
24be3e5628
commit
ff3717e719
2 changed files with 13 additions and 8 deletions
|
@ -750,7 +750,11 @@ nmethod::nmethod(
|
||||||
_hotness_counter = NMethodSweeper::hotness_counter_reset_val();
|
_hotness_counter = NMethodSweeper::hotness_counter_reset_val();
|
||||||
|
|
||||||
code_buffer->copy_values_to(this);
|
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);
|
CodeCache::commit(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2658,19 +2658,20 @@ JRT_ENTRY_NO_ASYNC(void, SharedRuntime::block_for_jni_critical(JavaThread* threa
|
||||||
JRT_END
|
JRT_END
|
||||||
|
|
||||||
#ifdef HAVE_DTRACE_H
|
#ifdef HAVE_DTRACE_H
|
||||||
// Create a dtrace nmethod for this method. The wrapper converts the
|
/**
|
||||||
// java compiled calling convention to the native convention, makes a dummy call
|
* Create a dtrace nmethod for this method. The wrapper converts the
|
||||||
// (actually nops for the size of the call instruction, which become a trap if
|
* Java-compiled calling convention to the native convention, makes a dummy call
|
||||||
// probe is enabled). The returns to the caller. Since this all looks like a
|
* (actually nops for the size of the call instruction, which become a trap if
|
||||||
// leaf no thread transition is needed.
|
* probe is enabled), and finally returns to the caller. Since this all looks like a
|
||||||
|
* leaf, no thread transition is needed.
|
||||||
|
*/
|
||||||
nmethod *AdapterHandlerLibrary::create_dtrace_nmethod(methodHandle method) {
|
nmethod *AdapterHandlerLibrary::create_dtrace_nmethod(methodHandle method) {
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
nmethod* nm = NULL;
|
nmethod* nm = NULL;
|
||||||
|
|
||||||
if (PrintCompilation) {
|
if (PrintCompilation) {
|
||||||
ttyLocker ttyl;
|
ttyLocker ttyl;
|
||||||
tty->print("--- n%s ");
|
tty->print("--- n ");
|
||||||
method->print_short_name(tty);
|
method->print_short_name(tty);
|
||||||
if (method->is_static()) {
|
if (method->is_static()) {
|
||||||
tty->print(" (static)");
|
tty->print(" (static)");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue