src/share/vm/runtime/thread.cpp

changeset 9925
30fb8c8cceb9
parent 9903
f37c2dd33031
child 9931
fd44df5e3bc3
child 9949
fb74ae591209
equal deleted inserted replaced
9924:89fb452b3688 9925:30fb8c8cceb9
3438 delete main_thread; 3438 delete main_thread;
3439 *canTryAgain = false; // don't let caller call JNI_CreateJavaVM again 3439 *canTryAgain = false; // don't let caller call JNI_CreateJavaVM again
3440 return status; 3440 return status;
3441 } 3441 }
3442 3442
3443 JFR_ONLY(Jfr::on_vm_init();) 3443 JFR_ONLY(Jfr::on_create_vm_1();)
3444 3444
3445 // Should be done after the heap is fully created 3445 // Should be done after the heap is fully created
3446 main_thread->cache_global_variables(); 3446 main_thread->cache_global_variables();
3447 3447
3448 HandleMark hm; 3448 HandleMark hm;
3489 if (DumpSharedSpaces) { 3489 if (DumpSharedSpaces) {
3490 MetaspaceShared::preload_and_dump(CHECK_0); 3490 MetaspaceShared::preload_and_dump(CHECK_0);
3491 ShouldNotReachHere(); 3491 ShouldNotReachHere();
3492 } 3492 }
3493 3493
3494 #if !INCLUDE_JFR
3495 // if JFR is not enabled at the build time keep the original JvmtiExport location
3496
3494 // Always call even when there are not JVMTI environments yet, since environments 3497 // Always call even when there are not JVMTI environments yet, since environments
3495 // may be attached late and JVMTI must track phases of VM execution 3498 // may be attached late and JVMTI must track phases of VM execution
3496 JvmtiExport::enter_start_phase(); 3499 JvmtiExport::enter_start_phase();
3497 3500
3498 // Notify JVMTI agents that VM has started (JNI is up) - nop if no agents. 3501 // Notify JVMTI agents that VM has started (JNI is up) - nop if no agents.
3499 JvmtiExport::post_vm_start(); 3502 JvmtiExport::post_vm_start();
3503 #endif
3500 3504
3501 { 3505 {
3502 TraceTime timer("Initialize java.lang classes", TraceStartupTime); 3506 TraceTime timer("Initialize java.lang classes", TraceStartupTime);
3503 3507
3504 if (EagerXrunInit && Arguments::init_libraries_at_startup()) { 3508 if (EagerXrunInit && Arguments::init_libraries_at_startup()) {
3540 initialize_class(vmSymbols::java_lang_ArithmeticException(), CHECK_0); 3544 initialize_class(vmSymbols::java_lang_ArithmeticException(), CHECK_0);
3541 initialize_class(vmSymbols::java_lang_StackOverflowError(), CHECK_0); 3545 initialize_class(vmSymbols::java_lang_StackOverflowError(), CHECK_0);
3542 initialize_class(vmSymbols::java_lang_IllegalMonitorStateException(), CHECK_0); 3546 initialize_class(vmSymbols::java_lang_IllegalMonitorStateException(), CHECK_0);
3543 initialize_class(vmSymbols::java_lang_IllegalArgumentException(), CHECK_0); 3547 initialize_class(vmSymbols::java_lang_IllegalArgumentException(), CHECK_0);
3544 } 3548 }
3549
3550 JFR_ONLY(
3551 Jfr::on_create_vm_2();
3552
3553 // if JFR is enabled at build time the JVMTI needs to be handled only after on_create_vm_2() call
3554
3555 // Always call even when there are not JVMTI environments yet, since environments
3556 // may be attached late and JVMTI must track phases of VM execution
3557 JvmtiExport::enter_start_phase();
3558
3559 // Notify JVMTI agents that VM has started (JNI is up) - nop if no agents.
3560 JvmtiExport::post_vm_start();
3561 )
3545 3562
3546 // See : bugid 4211085. 3563 // See : bugid 4211085.
3547 // Background : the static initializer of java.lang.Compiler tries to read 3564 // Background : the static initializer of java.lang.Compiler tries to read
3548 // property"java.compiler" and read & write property "java.vm.info". 3565 // property"java.compiler" and read & write property "java.vm.info".
3549 // When a security manager is installed through the command line 3566 // When a security manager is installed through the command line
3635 } 3652 }
3636 3653
3637 // Notify JVMTI agents that VM initialization is complete - nop if no agents. 3654 // Notify JVMTI agents that VM initialization is complete - nop if no agents.
3638 JvmtiExport::post_vm_initialized(); 3655 JvmtiExport::post_vm_initialized();
3639 3656
3640 JFR_ONLY(Jfr::on_vm_start();) 3657 JFR_ONLY(Jfr::on_create_vm_3();)
3641 3658
3642 if (CleanChunkPoolAsync) { 3659 if (CleanChunkPoolAsync) {
3643 Chunk::start_chunk_pool_cleaner_task(); 3660 Chunk::start_chunk_pool_cleaner_task();
3644 } 3661 }
3645 3662

mercurial