< prev index next >

src/hotspot/share/prims/jvm.cpp

Print this page




  27 #include "classfile/classFileStream.hpp"
  28 #include "classfile/classLoader.hpp"
  29 #include "classfile/classLoaderData.hpp"
  30 #include "classfile/classLoaderData.inline.hpp"
  31 #include "classfile/javaAssertions.hpp"
  32 #include "classfile/javaClasses.inline.hpp"
  33 #include "classfile/moduleEntry.hpp"
  34 #include "classfile/modules.hpp"
  35 #include "classfile/packageEntry.hpp"
  36 #include "classfile/stringTable.hpp"
  37 #include "classfile/symbolTable.hpp"
  38 #include "classfile/systemDictionary.hpp"
  39 #include "classfile/vmSymbols.hpp"
  40 #include "gc/shared/collectedHeap.inline.hpp"
  41 #include "interpreter/bytecode.hpp"
  42 #include "interpreter/bytecodeUtils.hpp"
  43 #include "jfr/jfrEvents.hpp"
  44 #include "logging/log.hpp"
  45 #include "memory/dynamicArchive.hpp"
  46 #include "memory/heapShared.hpp"

  47 #include "memory/oopFactory.hpp"
  48 #include "memory/referenceType.hpp"
  49 #include "memory/resourceArea.hpp"
  50 #include "memory/universe.hpp"
  51 #include "oops/access.inline.hpp"
  52 #include "oops/constantPool.hpp"
  53 #include "oops/fieldStreams.inline.hpp"
  54 #include "oops/instanceKlass.hpp"
  55 #include "oops/method.hpp"
  56 #include "oops/recordComponent.hpp"
  57 #include "oops/objArrayKlass.hpp"
  58 #include "oops/objArrayOop.inline.hpp"
  59 #include "oops/oop.inline.hpp"
  60 #include "prims/jvm_misc.hpp"
  61 #include "prims/jvmtiExport.hpp"
  62 #include "prims/jvmtiThreadState.hpp"
  63 #include "prims/nativeLookup.hpp"
  64 #include "prims/stackwalk.hpp"
  65 #include "runtime/arguments.hpp"
  66 #include "runtime/atomic.hpp"


3827   Handle method_type_oop(THREAD, JNIHandles::resolve_non_null(methodType));
3828   Symbol* method_type = java_lang_invoke_MethodType::as_signature(method_type_oop(), true);
3829 
3830   Handle impl_method_member_oop(THREAD, JNIHandles::resolve_non_null(implMethodMember));
3831   assert(java_lang_invoke_MemberName::is_method(impl_method_member_oop()), "must be");
3832   Method* m = java_lang_invoke_MemberName::vmtarget(impl_method_member_oop());
3833 
3834   Handle instantiated_method_type_oop(THREAD, JNIHandles::resolve_non_null(instantiatedMethodType));
3835   Symbol* instantiated_method_type = java_lang_invoke_MethodType::as_signature(instantiated_method_type_oop(), true);
3836 
3837   InstanceKlass* lambda_ik = SystemDictionaryShared::get_shared_lambda_proxy_class(caller_ik, invoked_name, invoked_type,
3838                                                                                    method_type, m, instantiated_method_type);
3839   jclass jcls = NULL;
3840   if (lambda_ik != NULL) {
3841     InstanceKlass* loaded_lambda = SystemDictionaryShared::prepare_shared_lambda_proxy_class(lambda_ik, caller_ik, initialize, THREAD);
3842     jcls = loaded_lambda == NULL ? NULL : (jclass) JNIHandles::make_local(THREAD, loaded_lambda->java_mirror());
3843   }
3844   return jcls;
3845 #else
3846   return NULL;











3847 #endif // INCLUDE_CDS
3848 JVM_END
3849 
3850 JVM_ENTRY(jboolean, JVM_IsCDSDumpingEnabled(JNIEnv* env))
3851     JVMWrapper("JVM_IsCDSDumpingEnable");
3852     return DynamicDumpSharedSpaces;
3853 JVM_END
3854 
3855 JVM_ENTRY(jboolean, JVM_IsCDSSharingEnabled(JNIEnv* env))
3856     JVMWrapper("JVM_IsCDSSharingEnable");
3857     return UseSharedSpaces;
3858 JVM_END
3859 
3860 JVM_ENTRY_NO_ENV(jlong, JVM_GetRandomSeedForCDSDump())
3861   JVMWrapper("JVM_GetRandomSeedForCDSDump");
3862   if (DumpSharedSpaces) {
3863     const char* release = Abstract_VM_Version::vm_release();
3864     const char* dbg_level = Abstract_VM_Version::jdk_debug_level();
3865     const char* version = VM_Version::internal_vm_info_string();
3866     jlong seed = (jlong)(java_lang_String::hash_code((const jbyte*)release, (int)strlen(release)) ^




  27 #include "classfile/classFileStream.hpp"
  28 #include "classfile/classLoader.hpp"
  29 #include "classfile/classLoaderData.hpp"
  30 #include "classfile/classLoaderData.inline.hpp"
  31 #include "classfile/javaAssertions.hpp"
  32 #include "classfile/javaClasses.inline.hpp"
  33 #include "classfile/moduleEntry.hpp"
  34 #include "classfile/modules.hpp"
  35 #include "classfile/packageEntry.hpp"
  36 #include "classfile/stringTable.hpp"
  37 #include "classfile/symbolTable.hpp"
  38 #include "classfile/systemDictionary.hpp"
  39 #include "classfile/vmSymbols.hpp"
  40 #include "gc/shared/collectedHeap.inline.hpp"
  41 #include "interpreter/bytecode.hpp"
  42 #include "interpreter/bytecodeUtils.hpp"
  43 #include "jfr/jfrEvents.hpp"
  44 #include "logging/log.hpp"
  45 #include "memory/dynamicArchive.hpp"
  46 #include "memory/heapShared.hpp"
  47 #include "memory/lambdaFormInvokers.hpp"
  48 #include "memory/oopFactory.hpp"
  49 #include "memory/referenceType.hpp"
  50 #include "memory/resourceArea.hpp"
  51 #include "memory/universe.hpp"
  52 #include "oops/access.inline.hpp"
  53 #include "oops/constantPool.hpp"
  54 #include "oops/fieldStreams.inline.hpp"
  55 #include "oops/instanceKlass.hpp"
  56 #include "oops/method.hpp"
  57 #include "oops/recordComponent.hpp"
  58 #include "oops/objArrayKlass.hpp"
  59 #include "oops/objArrayOop.inline.hpp"
  60 #include "oops/oop.inline.hpp"
  61 #include "prims/jvm_misc.hpp"
  62 #include "prims/jvmtiExport.hpp"
  63 #include "prims/jvmtiThreadState.hpp"
  64 #include "prims/nativeLookup.hpp"
  65 #include "prims/stackwalk.hpp"
  66 #include "runtime/arguments.hpp"
  67 #include "runtime/atomic.hpp"


3828   Handle method_type_oop(THREAD, JNIHandles::resolve_non_null(methodType));
3829   Symbol* method_type = java_lang_invoke_MethodType::as_signature(method_type_oop(), true);
3830 
3831   Handle impl_method_member_oop(THREAD, JNIHandles::resolve_non_null(implMethodMember));
3832   assert(java_lang_invoke_MemberName::is_method(impl_method_member_oop()), "must be");
3833   Method* m = java_lang_invoke_MemberName::vmtarget(impl_method_member_oop());
3834 
3835   Handle instantiated_method_type_oop(THREAD, JNIHandles::resolve_non_null(instantiatedMethodType));
3836   Symbol* instantiated_method_type = java_lang_invoke_MethodType::as_signature(instantiated_method_type_oop(), true);
3837 
3838   InstanceKlass* lambda_ik = SystemDictionaryShared::get_shared_lambda_proxy_class(caller_ik, invoked_name, invoked_type,
3839                                                                                    method_type, m, instantiated_method_type);
3840   jclass jcls = NULL;
3841   if (lambda_ik != NULL) {
3842     InstanceKlass* loaded_lambda = SystemDictionaryShared::prepare_shared_lambda_proxy_class(lambda_ik, caller_ik, initialize, THREAD);
3843     jcls = loaded_lambda == NULL ? NULL : (jclass) JNIHandles::make_local(THREAD, loaded_lambda->java_mirror());
3844   }
3845   return jcls;
3846 #else
3847   return NULL;
3848 #endif // INCLUDE_CDS
3849 JVM_END
3850 
3851 JVM_ENTRY(void, JVM_CDSTraceResolve(JNIEnv* env, jclass ignored, jstring line))
3852 #if INCLUDE_CDS
3853   if (line != NULL && DumpLoadedClassList != NULL && classlist_file->is_open()) {
3854     ResourceMark rm(THREAD);
3855     Handle h_line (THREAD, JNIHandles::resolve_non_null(line));
3856     char* c_line = java_lang_String::as_utf8_string(h_line());
3857     classlist_file->print_cr("%s %s", LambdaFormInvokers::lambda_form_invoker_tag(), c_line);
3858   }
3859 #endif // INCLUDE_CDS
3860 JVM_END
3861 
3862 JVM_ENTRY(jboolean, JVM_IsCDSDumpingEnabled(JNIEnv* env))
3863     JVMWrapper("JVM_IsCDSDumpingEnable");
3864     return DynamicDumpSharedSpaces;
3865 JVM_END
3866 
3867 JVM_ENTRY(jboolean, JVM_IsCDSSharingEnabled(JNIEnv* env))
3868     JVMWrapper("JVM_IsCDSSharingEnable");
3869     return UseSharedSpaces;
3870 JVM_END
3871 
3872 JVM_ENTRY_NO_ENV(jlong, JVM_GetRandomSeedForCDSDump())
3873   JVMWrapper("JVM_GetRandomSeedForCDSDump");
3874   if (DumpSharedSpaces) {
3875     const char* release = Abstract_VM_Version::vm_release();
3876     const char* dbg_level = Abstract_VM_Version::jdk_debug_level();
3877     const char* version = VM_Version::internal_vm_info_string();
3878     jlong seed = (jlong)(java_lang_String::hash_code((const jbyte*)release, (int)strlen(release)) ^


< prev index next >