3760 // Monitors can have spurious returns, must always check another state flag
3761 {
3762 MutexLocker ml(Notify_lock);
3763 os::start_thread(vmthread);
3764 while (vmthread->active_handles() == NULL) {
3765 Notify_lock->wait();
3766 }
3767 }
3768 }
3769
3770 assert(Universe::is_fully_initialized(), "not initialized");
3771 if (VerifyDuringStartup) {
3772 // Make sure we're starting with a clean slate.
3773 VM_Verify verify_op;
3774 VMThread::execute(&verify_op);
3775 }
3776
3777 // We need this to update the java.vm.info property in case any flags used
3778 // to initially define it have been changed. This is needed for both CDS and
3779 // AOT, since UseSharedSpaces and UseAOT may be changed after java.vm.info
3780 // is initially computed. See Abstract_VM_Version::vm_info_string().
3781 // This update must happen before we initialize the java classes, but
3782 // after any initialization logic that might modify the flags.
3783 Arguments::update_vm_info_property(VM_Version::vm_info_string());
3784
3785 Thread* THREAD = Thread::current();
3786
3787 // Always call even when there are not JVMTI environments yet, since environments
3788 // may be attached late and JVMTI must track phases of VM execution
3789 JvmtiExport::enter_early_start_phase();
3790
3791 // Notify JVMTI agents that VM has started (JNI is up) - nop if no agents.
3792 JvmtiExport::post_early_vm_start();
3793
3794 initialize_java_lang_classes(main_thread, CHECK_JNI_ERR);
3795
3796 quicken_jni_functions();
3797
3798 // No more stub generation allowed after that point.
3799 StubCodeDesc::freeze();
3800
4552 JavaThread* the_owner = NULL;
4553 DO_JAVA_THREADS(t_list, q) {
4554 if (q->is_lock_owned(owner)) {
4555 the_owner = q;
4556 break;
4557 }
4558 }
4559
4560 // cannot assert on lack of success here; see above comment
4561 return the_owner;
4562 }
4563
4564 // Threads::print_on() is called at safepoint by VM_PrintThreads operation.
4565 void Threads::print_on(outputStream* st, bool print_stacks,
4566 bool internal_format, bool print_concurrent_locks,
4567 bool print_extended_info) {
4568 char buf[32];
4569 st->print_raw_cr(os::local_time_string(buf, sizeof(buf)));
4570
4571 st->print_cr("Full thread dump %s (%s %s):",
4572 Abstract_VM_Version::vm_name(),
4573 Abstract_VM_Version::vm_release(),
4574 Abstract_VM_Version::vm_info_string());
4575 st->cr();
4576
4577 #if INCLUDE_SERVICES
4578 // Dump concurrent locks
4579 ConcurrentLocksDump concurrent_locks;
4580 if (print_concurrent_locks) {
4581 concurrent_locks.dump_at_safepoint();
4582 }
4583 #endif // INCLUDE_SERVICES
4584
4585 ThreadsSMRSupport::print_info_on(st);
4586 st->cr();
4587
4588 ALL_JAVA_THREADS(p) {
4589 ResourceMark rm;
4590 p->print_on(st, print_extended_info);
4591 if (print_stacks) {
4592 if (internal_format) {
4593 p->trace_stack();
4594 } else {
|
3760 // Monitors can have spurious returns, must always check another state flag
3761 {
3762 MutexLocker ml(Notify_lock);
3763 os::start_thread(vmthread);
3764 while (vmthread->active_handles() == NULL) {
3765 Notify_lock->wait();
3766 }
3767 }
3768 }
3769
3770 assert(Universe::is_fully_initialized(), "not initialized");
3771 if (VerifyDuringStartup) {
3772 // Make sure we're starting with a clean slate.
3773 VM_Verify verify_op;
3774 VMThread::execute(&verify_op);
3775 }
3776
3777 // We need this to update the java.vm.info property in case any flags used
3778 // to initially define it have been changed. This is needed for both CDS and
3779 // AOT, since UseSharedSpaces and UseAOT may be changed after java.vm.info
3780 // is initially computed. See VM_Version::vm_info_string().
3781 // This update must happen before we initialize the java classes, but
3782 // after any initialization logic that might modify the flags.
3783 Arguments::update_vm_info_property(VM_Version::vm_info_string());
3784
3785 Thread* THREAD = Thread::current();
3786
3787 // Always call even when there are not JVMTI environments yet, since environments
3788 // may be attached late and JVMTI must track phases of VM execution
3789 JvmtiExport::enter_early_start_phase();
3790
3791 // Notify JVMTI agents that VM has started (JNI is up) - nop if no agents.
3792 JvmtiExport::post_early_vm_start();
3793
3794 initialize_java_lang_classes(main_thread, CHECK_JNI_ERR);
3795
3796 quicken_jni_functions();
3797
3798 // No more stub generation allowed after that point.
3799 StubCodeDesc::freeze();
3800
4552 JavaThread* the_owner = NULL;
4553 DO_JAVA_THREADS(t_list, q) {
4554 if (q->is_lock_owned(owner)) {
4555 the_owner = q;
4556 break;
4557 }
4558 }
4559
4560 // cannot assert on lack of success here; see above comment
4561 return the_owner;
4562 }
4563
4564 // Threads::print_on() is called at safepoint by VM_PrintThreads operation.
4565 void Threads::print_on(outputStream* st, bool print_stacks,
4566 bool internal_format, bool print_concurrent_locks,
4567 bool print_extended_info) {
4568 char buf[32];
4569 st->print_raw_cr(os::local_time_string(buf, sizeof(buf)));
4570
4571 st->print_cr("Full thread dump %s (%s %s):",
4572 VM_Version::vm_name(),
4573 VM_Version::vm_release(),
4574 VM_Version::vm_info_string());
4575 st->cr();
4576
4577 #if INCLUDE_SERVICES
4578 // Dump concurrent locks
4579 ConcurrentLocksDump concurrent_locks;
4580 if (print_concurrent_locks) {
4581 concurrent_locks.dump_at_safepoint();
4582 }
4583 #endif // INCLUDE_SERVICES
4584
4585 ThreadsSMRSupport::print_info_on(st);
4586 st->cr();
4587
4588 ALL_JAVA_THREADS(p) {
4589 ResourceMark rm;
4590 p->print_on(st, print_extended_info);
4591 if (print_stacks) {
4592 if (internal_format) {
4593 p->trace_stack();
4594 } else {
|