6650373: Assert in methodOopDesc::make_adapters()
AdapterHandlerLibrary::get_create_adapter_index() returns incorrect value (-2) when CodeCache is full. Reviewed-by: sgoldman
This commit is contained in:
parent
e06dedd2f1
commit
0dd8f3e8c0
@ -921,11 +921,8 @@ static void turn_off_compiler(Compile* C) {
|
|||||||
// blown the code cache size.
|
// blown the code cache size.
|
||||||
C->record_failure("excessive request to CodeCache");
|
C->record_failure("excessive request to CodeCache");
|
||||||
} else {
|
} else {
|
||||||
UseInterpreter = true;
|
// Let CompilerBroker disable further compilations.
|
||||||
UseCompiler = false;
|
|
||||||
AlwaysCompileLoopMethods = false;
|
|
||||||
C->record_failure("CodeCache is full");
|
C->record_failure("CodeCache is full");
|
||||||
warning("CodeCache is full. Compiling has been disabled");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1839,7 +1839,25 @@ int AdapterHandlerLibrary::get_create_adapter_index(methodHandle method) {
|
|||||||
regs);
|
regs);
|
||||||
|
|
||||||
B = BufferBlob::create(AdapterHandlerEntry::name, &buffer);
|
B = BufferBlob::create(AdapterHandlerEntry::name, &buffer);
|
||||||
if (B == NULL) return -2; // Out of CodeCache space
|
if (B == NULL) {
|
||||||
|
// CodeCache is full, disable compilation
|
||||||
|
// Ought to log this but compile log is only per compile thread
|
||||||
|
// and we're some non descript Java thread.
|
||||||
|
UseInterpreter = true;
|
||||||
|
if (UseCompiler || AlwaysCompileLoopMethods ) {
|
||||||
|
#ifndef PRODUCT
|
||||||
|
warning("CodeCache is full. Compiler has been disabled");
|
||||||
|
if (CompileTheWorld || ExitOnFullCodeCache) {
|
||||||
|
before_exit(JavaThread::current());
|
||||||
|
exit_globals(); // will delete tty
|
||||||
|
vm_direct_exit(CompileTheWorld ? 0 : 1);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
UseCompiler = false;
|
||||||
|
AlwaysCompileLoopMethods = false;
|
||||||
|
}
|
||||||
|
return 0; // Out of CodeCache space (_handlers[0] == NULL)
|
||||||
|
}
|
||||||
entry->relocate(B->instructions_begin());
|
entry->relocate(B->instructions_begin());
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
// debugging suppport
|
// debugging suppport
|
||||||
|
Loading…
x
Reference in New Issue
Block a user