hotspot/src/share/vm/runtime/thread.cpp
changeset 36384 b0b41336a9a8
parent 36379 0c596dc28ed7
child 36396 26a241a959de
equal deleted inserted replaced
36383:f41dad80f4e3 36384:b0b41336a9a8
  1692     JvmtiExport::post_thread_start(this);
  1692     JvmtiExport::post_thread_start(this);
  1693   }
  1693   }
  1694 
  1694 
  1695   EventThreadStart event;
  1695   EventThreadStart event;
  1696   if (event.should_commit()) {
  1696   if (event.should_commit()) {
  1697     event.set_javalangthread(java_lang_Thread::thread_id(this->threadObj()));
  1697     event.set_thread(THREAD_TRACE_ID(this));
  1698     event.commit();
  1698     event.commit();
  1699   }
  1699   }
  1700 
  1700 
  1701   // We call another function to do the rest so we are sure that the stack addresses used
  1701   // We call another function to do the rest so we are sure that the stack addresses used
  1702   // from there will be lower than the stack base just computed
  1702   // from there will be lower than the stack base just computed
  1797 
  1797 
  1798     // Called before the java thread exit since we want to read info
  1798     // Called before the java thread exit since we want to read info
  1799     // from java_lang_Thread object
  1799     // from java_lang_Thread object
  1800     EventThreadEnd event;
  1800     EventThreadEnd event;
  1801     if (event.should_commit()) {
  1801     if (event.should_commit()) {
  1802       event.set_javalangthread(java_lang_Thread::thread_id(this->threadObj()));
  1802       event.set_thread(THREAD_TRACE_ID(this));
  1803       event.commit();
  1803       event.commit();
  1804     }
  1804     }
  1805 
  1805 
  1806     // Call after last event on thread
  1806     // Call after last event on thread
  1807     EVENT_THREAD_EXIT(this);
  1807     EVENT_THREAD_EXIT(this);
  3552     delete main_thread;
  3552     delete main_thread;
  3553     *canTryAgain = false; // don't let caller call JNI_CreateJavaVM again
  3553     *canTryAgain = false; // don't let caller call JNI_CreateJavaVM again
  3554     return status;
  3554     return status;
  3555   }
  3555   }
  3556 
  3556 
       
  3557   if (TRACE_INITIALIZE() != JNI_OK) {
       
  3558     vm_exit_during_initialization("Failed to initialize tracing backend");
       
  3559   }
       
  3560 
  3557   // Should be done after the heap is fully created
  3561   // Should be done after the heap is fully created
  3558   main_thread->cache_global_variables();
  3562   main_thread->cache_global_variables();
  3559 
  3563 
  3560   HandleMark hm;
  3564   HandleMark hm;
  3561 
  3565 
  3619   // with the default value of CDS "sharing" which may be reset through
  3623   // with the default value of CDS "sharing" which may be reset through
  3620   // command line options.
  3624   // command line options.
  3621   reset_vm_info_property(CHECK_JNI_ERR);
  3625   reset_vm_info_property(CHECK_JNI_ERR);
  3622 
  3626 
  3623   quicken_jni_functions();
  3627   quicken_jni_functions();
  3624 
       
  3625   // Must be run after init_ft which initializes ft_enabled
       
  3626   if (TRACE_INITIALIZE() != JNI_OK) {
       
  3627     vm_exit_during_initialization("Failed to initialize tracing backend");
       
  3628   }
       
  3629 
  3628 
  3630   // No more stub generation allowed after that point.
  3629   // No more stub generation allowed after that point.
  3631   StubCodeDesc::freeze();
  3630   StubCodeDesc::freeze();
  3632 
  3631 
  3633   // Set flag that basic initialization has completed. Used by exceptions and various
  3632   // Set flag that basic initialization has completed. Used by exceptions and various