< prev index next >

src/hotspot/share/prims/jvm.cpp

Print this page




 451  *
 452  * It is important that this directory is well-known and the
 453  * same for all VM instances. It cannot be affected by configuration
 454  * variables such as java.io.tmpdir.
 455  */
 456 JVM_ENTRY(jstring, JVM_GetTemporaryDirectory(JNIEnv *env))
 457   JVMWrapper("JVM_GetTemporaryDirectory");
 458   HandleMark hm(THREAD);
 459   const char* temp_dir = os::get_temp_directory();
 460   Handle h = java_lang_String::create_from_platform_dependent_str(temp_dir, CHECK_NULL);
 461   return (jstring) JNIHandles::make_local(env, h());
 462 JVM_END
 463 
 464 
 465 // java.lang.Runtime /////////////////////////////////////////////////////////////////////////
 466 
 467 extern volatile jint vm_created;
 468 
 469 JVM_ENTRY_NO_ENV(void, JVM_BeforeHalt())
 470   JVMWrapper("JVM_BeforeHalt");




 471   EventShutdown event;
 472   if (event.should_commit()) {
 473     event.set_reason("Shutdown requested from Java");
 474     event.commit();
 475   }
 476 JVM_END
 477 
 478 
 479 JVM_ENTRY_NO_ENV(void, JVM_Halt(jint code))
 480   before_exit(thread);
 481   vm_exit(code);
 482 JVM_END
 483 
 484 
 485 JVM_ENTRY_NO_ENV(void, JVM_GC(void))
 486   JVMWrapper("JVM_GC");
 487   if (!DisableExplicitGC) {
 488     Universe::heap()->collect(GCCause::_java_lang_system_gc);
 489   }
 490 JVM_END




 451  *
 452  * It is important that this directory is well-known and the
 453  * same for all VM instances. It cannot be affected by configuration
 454  * variables such as java.io.tmpdir.
 455  */
 456 JVM_ENTRY(jstring, JVM_GetTemporaryDirectory(JNIEnv *env))
 457   JVMWrapper("JVM_GetTemporaryDirectory");
 458   HandleMark hm(THREAD);
 459   const char* temp_dir = os::get_temp_directory();
 460   Handle h = java_lang_String::create_from_platform_dependent_str(temp_dir, CHECK_NULL);
 461   return (jstring) JNIHandles::make_local(env, h());
 462 JVM_END
 463 
 464 
 465 // java.lang.Runtime /////////////////////////////////////////////////////////////////////////
 466 
 467 extern volatile jint vm_created;
 468 
 469 JVM_ENTRY_NO_ENV(void, JVM_BeforeHalt())
 470   JVMWrapper("JVM_BeforeHalt");
 471   // Link all classes for dynamic CDS dumping before vm exit.
 472   if (DynamicDumpSharedSpaces) {
 473     MetaspaceShared::link_and_cleanup_shared_classes(false, THREAD);
 474   }
 475   EventShutdown event;
 476   if (event.should_commit()) {
 477     event.set_reason("Shutdown requested from Java");
 478     event.commit();
 479   }
 480 JVM_END
 481 
 482 
 483 JVM_ENTRY_NO_ENV(void, JVM_Halt(jint code))
 484   before_exit(thread);
 485   vm_exit(code);
 486 JVM_END
 487 
 488 
 489 JVM_ENTRY_NO_ENV(void, JVM_GC(void))
 490   JVMWrapper("JVM_GC");
 491   if (!DisableExplicitGC) {
 492     Universe::heap()->collect(GCCause::_java_lang_system_gc);
 493   }
 494 JVM_END


< prev index next >