mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8058536: java/lang/instrument/NativeMethodPrefixAgent.java fails due to VirtualMachineError: out of space in CodeCache for method handle intrinsic
Make sure MH intrinsics can be created before compiler instances Reviewed-by: kvn
This commit is contained in:
parent
854f91fd5b
commit
bea6d40f48
1 changed files with 8 additions and 6 deletions
|
@ -2273,12 +2273,14 @@ methodHandle SystemDictionary::find_method_handle_intrinsic(vmIntrinsics::ID iid
|
||||||
spe = NULL;
|
spe = NULL;
|
||||||
// Must create lots of stuff here, but outside of the SystemDictionary lock.
|
// Must create lots of stuff here, but outside of the SystemDictionary lock.
|
||||||
m = Method::make_method_handle_intrinsic(iid, signature, CHECK_(empty));
|
m = Method::make_method_handle_intrinsic(iid, signature, CHECK_(empty));
|
||||||
CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_highest_tier,
|
if (!Arguments::is_interpreter_only()) {
|
||||||
methodHandle(), CompileThreshold, "MH", CHECK_(empty));
|
// Generate a compiled form of the MH intrinsic.
|
||||||
// Check if we need to have compiled code but we don't.
|
AdapterHandlerLibrary::create_native_wrapper(m);
|
||||||
if (!Arguments::is_interpreter_only() && !m->has_compiled_code()) {
|
// Check if have the compiled code.
|
||||||
THROW_MSG_(vmSymbols::java_lang_VirtualMachineError(),
|
if (!m->has_compiled_code()) {
|
||||||
"out of space in CodeCache for method handle intrinsic", empty);
|
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,
|
// 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.
|
// if a racing thread has managed to install one at the same time.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue