src/share/vm/classfile/systemDictionary.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/classfile/systemDictionary.cpp Wed Sep 10 16:21:59 2014
--- new/src/share/vm/classfile/systemDictionary.cpp Wed Sep 10 16:21:59 2014
*** 2272,2282 ****
--- 2272,2286 ----
spe = NULL;
// Must create lots of stuff here, but outside of the SystemDictionary lock.
m = Method::make_method_handle_intrinsic(iid, signature, CHECK_(empty));
CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_highest_tier,
methodHandle(), CompileThreshold, "MH", CHECK_(empty));
+ // Check if we need to have compiled code but we don't.
+ if (!Arguments::is_interpreter_only() && !m->has_compiled_code()) {
+ THROW_MSG_(vmSymbols::java_lang_VirtualMachineError(),
+ "out of space in CodeCache for method handle intrinsic", empty);
+ }
// Now grab the lock. We might have to throw away the new method,
// if a racing thread has managed to install one at the same time.
{
MutexLocker ml(SystemDictionary_lock, THREAD);
spe = invoke_method_table()->find_entry(index, hash, signature, iid);
*** 2286,2296 ****
--- 2290,2300 ----
spe->set_method(m());
}
}
assert(spe != NULL && spe->method() != NULL, "");
! assert(!UseCompiler || (spe->method()->has_compiled_code() &&
! assert(Arguments::is_interpreter_only() || (spe->method()->has_compiled_code() &&
spe->method()->code()->entry_point() == spe->method()->from_compiled_entry()),
"MH intrinsic invariant");
return spe->method();
}
src/share/vm/classfile/systemDictionary.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File