< prev index next > src/hotspot/cpu/x86/runtime_x86_64.cpp
Print this page
*/
#ifdef COMPILER2
#include "asm/macroAssembler.hpp"
#include "asm/macroAssembler.inline.hpp"
+ #include "code/aotCodeCache.hpp"
#include "code/vmreg.hpp"
#include "interpreter/interpreter.hpp"
#include "opto/runtime.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
assert(!OptoRuntime::is_callee_saved_register(RAX_num), "");
assert(!OptoRuntime::is_callee_saved_register(RCX_num), "");
assert(SimpleRuntimeFrame::framesize % 4 == 0, "sp not 16-byte aligned");
// Allocate space for the code
ResourceMark rm;
// Setup code generation tools
- const char* name = OptoRuntime::stub_name(OptoStubId::exception_id);
CodeBuffer buffer(name, 2048, 1024);
if (buffer.blob() == nullptr) {
return nullptr;
}
MacroAssembler* masm = new MacroAssembler(&buffer);
assert(!OptoRuntime::is_callee_saved_register(RAX_num), "");
assert(!OptoRuntime::is_callee_saved_register(RCX_num), "");
assert(SimpleRuntimeFrame::framesize % 4 == 0, "sp not 16-byte aligned");
+ const char* name = OptoRuntime::stub_name(OptoStubId::exception_id);
+ CodeBlob* blob = AOTCodeCache::load_code_blob(AOTCodeEntry::Blob, (uint)OptoStubId::exception_id, name);
+ if (blob != nullptr) {
+ return blob->as_exception_blob();
+ }
+
// Allocate space for the code
ResourceMark rm;
// Setup code generation tools
CodeBuffer buffer(name, 2048, 1024);
if (buffer.blob() == nullptr) {
return nullptr;
}
MacroAssembler* masm = new MacroAssembler(&buffer);
// Make sure all code is generated
masm->flush();
// Set exception blob
! return ExceptionBlob::create(&buffer, oop_maps, SimpleRuntimeFrame::framesize >> 1);
}
#endif // COMPILER2
// Make sure all code is generated
masm->flush();
// Set exception blob
! ExceptionBlob* ex_blob = ExceptionBlob::create(&buffer, oop_maps, SimpleRuntimeFrame::framesize >> 1);
+ AOTCodeCache::store_code_blob(*ex_blob, AOTCodeEntry::Blob, (uint)OptoStubId::exception_id, name);
+ return ex_blob;
}
#endif // COMPILER2
< prev index next >