mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
8151956: Support non-continuous CodeBlobs in HotSpot
Reviewed-by: iveresov, thartmann, simonis
This commit is contained in:
parent
67ff4391ec
commit
b853eb7f5c
100 changed files with 2486 additions and 1868 deletions
|
@ -1075,10 +1075,10 @@ nmethod* CompileBroker::compile_method(const methodHandle& method, int osr_bci,
|
|||
|
||||
if (osr_bci == InvocationEntryBci) {
|
||||
// standard compilation
|
||||
nmethod* method_code = method->code();
|
||||
if (method_code != NULL) {
|
||||
CompiledMethod* method_code = method->code();
|
||||
if (method_code != NULL && method_code->is_nmethod()) {
|
||||
if (compilation_is_complete(method, osr_bci, comp_level)) {
|
||||
return method_code;
|
||||
return (nmethod*) method_code;
|
||||
}
|
||||
}
|
||||
if (method->is_not_compilable(comp_level)) {
|
||||
|
@ -1184,7 +1184,12 @@ nmethod* CompileBroker::compile_method(const methodHandle& method, int osr_bci,
|
|||
// return requested nmethod
|
||||
// We accept a higher level osr method
|
||||
if (osr_bci == InvocationEntryBci) {
|
||||
return method->code();
|
||||
CompiledMethod* code = method->code();
|
||||
if (code == NULL) {
|
||||
return (nmethod*) code;
|
||||
} else {
|
||||
return code->as_nmethod_or_null();
|
||||
}
|
||||
}
|
||||
return method->lookup_osr_nmethod_for(osr_bci, comp_level, false);
|
||||
}
|
||||
|
@ -1209,7 +1214,7 @@ bool CompileBroker::compilation_is_complete(const methodHandle& method,
|
|||
if (method->is_not_compilable(comp_level)) {
|
||||
return true;
|
||||
} else {
|
||||
nmethod* result = method->code();
|
||||
CompiledMethod* result = method->code();
|
||||
if (result == NULL) return false;
|
||||
return comp_level == result->comp_level();
|
||||
}
|
||||
|
|
|
@ -135,7 +135,11 @@ AbstractCompiler* CompileTask::compiler() {
|
|||
//
|
||||
nmethod* CompileTask::code() const {
|
||||
if (_code_handle == NULL) return NULL;
|
||||
return _code_handle->code();
|
||||
CodeBlob *blob = _code_handle->code();
|
||||
if (blob != NULL) {
|
||||
return blob->as_nmethod();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CompileTask::set_code(nmethod* nm) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue