src/share/vm/jvmci/jvmciCompilerToVM.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/jvmci/jvmciCompilerToVM.cpp
src/share/vm/jvmci/jvmciCompilerToVM.cpp
Print this page
*** 845,855 ****
Handle speculation_log_handle = JNIHandles::resolve(speculation_log);
JVMCICompiler* compiler = JVMCICompiler::instance(CHECK_JNI_ERR);
TraceTime install_time("installCode", JVMCICompiler::codeInstallTimer());
! CodeInstaller installer;
JVMCIEnv::CodeInstallResult result = installer.install(compiler, target_handle, compiled_code_handle, cb, installed_code_handle, speculation_log_handle, CHECK_0);
if (PrintCodeCacheOnCompilation) {
stringStream s;
// Dump code cache into a buffer before locking the tty,
--- 845,856 ----
Handle speculation_log_handle = JNIHandles::resolve(speculation_log);
JVMCICompiler* compiler = JVMCICompiler::instance(CHECK_JNI_ERR);
TraceTime install_time("installCode", JVMCICompiler::codeInstallTimer());
! bool is_immutable_PIC = HotSpotCompiledCode::isImmutablePIC(compiled_code_handle) > 0;
! CodeInstaller installer(is_immutable_PIC);
JVMCIEnv::CodeInstallResult result = installer.install(compiler, target_handle, compiled_code_handle, cb, installed_code_handle, speculation_log_handle, CHECK_0);
if (PrintCodeCacheOnCompilation) {
stringStream s;
// Dump code cache into a buffer before locking the tty,
*** 903,913 ****
Handle compiled_code_handle = JNIHandles::resolve(compiled_code);
Handle metadata_handle = JNIHandles::resolve(metadata);
CodeMetadata code_metadata;
CodeBlob *cb = NULL;
! CodeInstaller installer;
JVMCIEnv::CodeInstallResult result = installer.gather_metadata(target_handle, compiled_code_handle, code_metadata, CHECK_0);
if (result != JVMCIEnv::ok) {
return result;
}
--- 904,914 ----
Handle compiled_code_handle = JNIHandles::resolve(compiled_code);
Handle metadata_handle = JNIHandles::resolve(metadata);
CodeMetadata code_metadata;
CodeBlob *cb = NULL;
! CodeInstaller installer(true /* immutable PIC compilation */);
JVMCIEnv::CodeInstallResult result = installer.gather_metadata(target_handle, compiled_code_handle, code_metadata, CHECK_0);
if (result != JVMCIEnv::ok) {
return result;
}
*** 939,949 ****
typeArrayHandle oopMapArrayHandle = oopFactory::new_byteArray(oopmap_size, CHECK_(JVMCIEnv::cache_full));
builder.generate_into((address) oopMapArrayHandle->byte_at_addr(0));
HotSpotMetaData::set_oopMaps(metadata_handle, oopMapArrayHandle());
}
! HotSpotMetaData::set_metadata(metadata_handle, NULL);
ExceptionHandlerTable* handler = code_metadata.get_exception_table();
int table_size = handler->size_in_bytes();
typeArrayHandle exceptionArrayOop = oopFactory::new_byteArray(table_size, CHECK_(JVMCIEnv::cache_full));
--- 940,959 ----
typeArrayHandle oopMapArrayHandle = oopFactory::new_byteArray(oopmap_size, CHECK_(JVMCIEnv::cache_full));
builder.generate_into((address) oopMapArrayHandle->byte_at_addr(0));
HotSpotMetaData::set_oopMaps(metadata_handle, oopMapArrayHandle());
}
! AOTOopRecorder* recorder = code_metadata.get_oop_recorder();
!
! int nr_meta_strings = recorder->nr_meta_strings();
! objArrayHandle metadataArrayHandle = oopFactory::new_objectArray(nr_meta_strings, CHECK_(JVMCIEnv::cache_full));
! for (int i = 0; i < nr_meta_strings; ++i) {
! const char* element = recorder->meta_element(i);
! Handle java_string = java_lang_String::create_from_str(element, CHECK_(JVMCIEnv::cache_full));
! metadataArrayHandle->obj_at_put(i, java_string());
! }
! HotSpotMetaData::set_metadata(metadata_handle, metadataArrayHandle());
ExceptionHandlerTable* handler = code_metadata.get_exception_table();
int table_size = handler->size_in_bytes();
typeArrayHandle exceptionArrayOop = oopFactory::new_byteArray(table_size, CHECK_(JVMCIEnv::cache_full));
*** 1491,1500 ****
--- 1501,1519 ----
}
}
THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), err_msg("Invalid profile data position %d", position));
C2V_END
+ C2V_VMENTRY(jlong, getFingerprint, (JNIEnv*, jobject, jlong metaspace_klass))
+ Klass *k = CompilerToVM::asKlass(metaspace_klass);
+ if (k->is_instance_klass()) {
+ return InstanceKlass::cast(k)->get_stored_fingerprint();
+ } else {
+ return 0;
+ }
+ C2V_END
+
C2V_VMENTRY(int, interpreterFrameSize, (JNIEnv*, jobject, jobject bytecode_frame_handle))
if (bytecode_frame_handle == NULL) {
THROW_0(vmSymbols::java_lang_NullPointerException());
}
*** 1619,1628 ****
--- 1638,1648 ----
{CC "materializeVirtualObjects", CC "(" HS_STACK_FRAME_REF "Z)V", FN_PTR(materializeVirtualObjects)},
{CC "shouldDebugNonSafepoints", CC "()Z", FN_PTR(shouldDebugNonSafepoints)},
{CC "writeDebugOutput", CC "([BII)V", FN_PTR(writeDebugOutput)},
{CC "flushDebugOutput", CC "()V", FN_PTR(flushDebugOutput)},
{CC "methodDataProfileDataSize", CC "(JI)I", FN_PTR(methodDataProfileDataSize)},
+ {CC "getFingerprint", CC "(J)J", FN_PTR(getFingerprint)},
{CC "interpreterFrameSize", CC "(" BYTECODE_FRAME ")I", FN_PTR(interpreterFrameSize)},
{CC "compileToBytecode", CC "(" OBJECT ")V", FN_PTR(compileToBytecode)},
};
int CompilerToVM::methods_count() {
src/share/vm/jvmci/jvmciCompilerToVM.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File