src/share/vm/prims/jni.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-gc-chunked-growablearray Sdiff src/share/vm/prims

src/share/vm/prims/jni.cpp

Print this page




5022   DT_RETURN_MARK(GetDefaultJavaVMInitArgs, jint, (const jint&)ret);
5023 
5024   if (Threads::is_supported_jni_version(args->version)) {
5025     ret = JNI_OK;
5026   }
5027   // 1.1 style no longer supported in hotspot.
5028   // According the JNI spec, we should update args->version on return.
5029   // We also use the structure to communicate with launcher about default
5030   // stack size.
5031   if (args->version == JNI_VERSION_1_1) {
5032     args->version = JNI_VERSION_1_2;
5033     // javaStackSize is int in arguments structure
5034     assert(jlong(ThreadStackSize) * K < INT_MAX, "integer overflow");
5035     args->javaStackSize = (jint)(ThreadStackSize * K);
5036   }
5037   return ret;
5038 }
5039 
5040 #ifndef PRODUCT
5041 

5042 #include "gc_interface/collectedHeap.hpp"
5043 #include "utilities/quickSort.hpp"
5044 #if INCLUDE_VM_STRUCTS
5045 #include "runtime/vmStructs.hpp"
5046 #endif
5047 
5048 #define run_unit_test(unit_test_function_call)              \
5049   tty->print_cr("Running test: " #unit_test_function_call); \
5050   unit_test_function_call
5051 
5052 void execute_internal_vm_tests() {
5053   if (ExecuteInternalVMTests) {
5054     tty->print_cr("Running internal VM tests");
5055     run_unit_test(arrayOopDesc::test_max_array_length());
5056     run_unit_test(CollectedHeap::test_is_in());
5057     run_unit_test(QuickSort::test_quick_sort());
5058     run_unit_test(AltHashing::test_alt_hash());


5059 #if INCLUDE_VM_STRUCTS
5060     run_unit_test(VMStructs::test());
5061 #endif
5062     tty->print_cr("All internal VM tests passed");
5063   }
5064 }
5065 
5066 #undef run_unit_test
5067 
5068 #endif
5069 
5070 #ifndef USDT2
5071 HS_DTRACE_PROBE_DECL3(hotspot_jni, CreateJavaVM__entry, vm, penv, args);
5072 DT_RETURN_MARK_DECL(CreateJavaVM, jint);
5073 #else /* USDT2 */
5074 DT_RETURN_MARK_DECL(CreateJavaVM, jint
5075                     , HOTSPOT_JNI_CREATEJAVAVM_RETURN(_ret_ref));
5076 #endif /* USDT2 */
5077 
5078 _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM(JavaVM **vm, void **penv, void *args) {




5022   DT_RETURN_MARK(GetDefaultJavaVMInitArgs, jint, (const jint&)ret);
5023 
5024   if (Threads::is_supported_jni_version(args->version)) {
5025     ret = JNI_OK;
5026   }
5027   // 1.1 style no longer supported in hotspot.
5028   // According the JNI spec, we should update args->version on return.
5029   // We also use the structure to communicate with launcher about default
5030   // stack size.
5031   if (args->version == JNI_VERSION_1_1) {
5032     args->version = JNI_VERSION_1_2;
5033     // javaStackSize is int in arguments structure
5034     assert(jlong(ThreadStackSize) * K < INT_MAX, "integer overflow");
5035     args->javaStackSize = (jint)(ThreadStackSize * K);
5036   }
5037   return ret;
5038 }
5039 
5040 #ifndef PRODUCT
5041 
5042 #include "gc_implementation/g1/g1PreserveMarkQueue.hpp"
5043 #include "gc_interface/collectedHeap.hpp"
5044 #include "utilities/quickSort.hpp"
5045 #if INCLUDE_VM_STRUCTS
5046 #include "runtime/vmStructs.hpp"
5047 #endif
5048 
5049 #define run_unit_test(unit_test_function_call)              \
5050   tty->print_cr("Running test: " #unit_test_function_call); \
5051   unit_test_function_call
5052 
5053 void execute_internal_vm_tests() {
5054   if (ExecuteInternalVMTests) {
5055     tty->print_cr("Running internal VM tests");
5056     run_unit_test(arrayOopDesc::test_max_array_length());
5057     run_unit_test(CollectedHeap::test_is_in());
5058     run_unit_test(QuickSort::test_quick_sort());
5059     run_unit_test(AltHashing::test_alt_hash());
5060     run_unit_test(g1PreserveMarkChunkTests());
5061     run_unit_test(g1PreserveMarkQueueTests());
5062 #if INCLUDE_VM_STRUCTS
5063     run_unit_test(VMStructs::test());
5064 #endif
5065     tty->print_cr("All internal VM tests passed");
5066   }
5067 }
5068 
5069 #undef run_unit_test
5070 
5071 #endif
5072 
5073 #ifndef USDT2
5074 HS_DTRACE_PROBE_DECL3(hotspot_jni, CreateJavaVM__entry, vm, penv, args);
5075 DT_RETURN_MARK_DECL(CreateJavaVM, jint);
5076 #else /* USDT2 */
5077 DT_RETURN_MARK_DECL(CreateJavaVM, jint
5078                     , HOTSPOT_JNI_CREATEJAVAVM_RETURN(_ret_ref));
5079 #endif /* USDT2 */
5080 
5081 _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM(JavaVM **vm, void **penv, void *args) {


src/share/vm/prims/jni.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File