src/share/vm/runtime/init.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 8059557_open Sdiff src/share/vm/runtime

src/share/vm/runtime/init.cpp

Print this page




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/stringTable.hpp"
  27 #include "code/icBuffer.hpp"
  28 #include "gc/shared/collectedHeap.hpp"
  29 #include "interpreter/bytecodes.hpp"
  30 #include "memory/universe.hpp"
  31 #include "prims/methodHandles.hpp"

  32 #include "runtime/handles.inline.hpp"
  33 #include "runtime/icache.hpp"
  34 #include "runtime/init.hpp"
  35 #include "runtime/safepoint.hpp"
  36 #include "runtime/sharedRuntime.hpp"
  37 #include "services/memTracker.hpp"
  38 #include "utilities/macros.hpp"
  39 
  40 
  41 // Initialization done by VM thread in vm_init_globals()
  42 void check_ThreadShadow();
  43 void eventlog_init();
  44 void mutex_init();
  45 void chunkpool_init();
  46 void perfMemory_init();
  47 
  48 // Initialization done by Java thread in init_globals()
  49 void management_init();
  50 void bytecodes_init();
  51 void classLoader_init();


 124   vtableStubs_init();
 125   InlineCacheBuffer_init();
 126   compilerOracle_init();
 127   compileBroker_init();
 128   VMRegImpl::set_regName();
 129 
 130   if (!universe_post_init()) {
 131     return JNI_ERR;
 132   }
 133   javaClasses_init();   // must happen after vtable initialization
 134   stubRoutines_init2(); // note: StubRoutines need 2-phase init
 135 
 136 #if INCLUDE_NMT
 137   // Solaris stack is walkable only after stubRoutines are set up.
 138   // On Other platforms, the stack is always walkable.
 139   NMT_stack_walkable = true;
 140 #endif // INCLUDE_NMT
 141 
 142   // All the flags that get adjusted by VM_Version_init and os::init_2
 143   // have been set so dump the flags now.
 144   if (PrintFlagsFinal) {
 145     CommandLineFlags::printFlags(tty, false);
 146   }
 147 
 148   return JNI_OK;
 149 }
 150 
 151 
 152 void exit_globals() {
 153   static bool destructorsCalled = false;
 154   if (!destructorsCalled) {
 155     destructorsCalled = true;
 156     perfMemory_exit();
 157     if (PrintSafepointStatistics) {
 158       // Print the collected safepoint statistics.
 159       SafepointSynchronize::print_stat_on_exit();
 160     }
 161     if (PrintStringTableStatistics) {
 162       SymbolTable::dump(tty);
 163       StringTable::dump(tty);
 164     }
 165     ostream_exit();


  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/stringTable.hpp"
  27 #include "code/icBuffer.hpp"
  28 #include "gc/shared/collectedHeap.hpp"
  29 #include "interpreter/bytecodes.hpp"
  30 #include "memory/universe.hpp"
  31 #include "prims/methodHandles.hpp"
  32 #include "runtime/globals.hpp"
  33 #include "runtime/handles.inline.hpp"
  34 #include "runtime/icache.hpp"
  35 #include "runtime/init.hpp"
  36 #include "runtime/safepoint.hpp"
  37 #include "runtime/sharedRuntime.hpp"
  38 #include "services/memTracker.hpp"
  39 #include "utilities/macros.hpp"
  40 
  41 
  42 // Initialization done by VM thread in vm_init_globals()
  43 void check_ThreadShadow();
  44 void eventlog_init();
  45 void mutex_init();
  46 void chunkpool_init();
  47 void perfMemory_init();
  48 
  49 // Initialization done by Java thread in init_globals()
  50 void management_init();
  51 void bytecodes_init();
  52 void classLoader_init();


 125   vtableStubs_init();
 126   InlineCacheBuffer_init();
 127   compilerOracle_init();
 128   compileBroker_init();
 129   VMRegImpl::set_regName();
 130 
 131   if (!universe_post_init()) {
 132     return JNI_ERR;
 133   }
 134   javaClasses_init();   // must happen after vtable initialization
 135   stubRoutines_init2(); // note: StubRoutines need 2-phase init
 136 
 137 #if INCLUDE_NMT
 138   // Solaris stack is walkable only after stubRoutines are set up.
 139   // On Other platforms, the stack is always walkable.
 140   NMT_stack_walkable = true;
 141 #endif // INCLUDE_NMT
 142 
 143   // All the flags that get adjusted by VM_Version_init and os::init_2
 144   // have been set so dump the flags now.
 145   if (PrintFlagsFinal || PrintFlagsRanges) {
 146     CommandLineFlags::printFlags(tty, false, PrintFlagsRanges);
 147   }
 148 
 149   return JNI_OK;
 150 }
 151 
 152 
 153 void exit_globals() {
 154   static bool destructorsCalled = false;
 155   if (!destructorsCalled) {
 156     destructorsCalled = true;
 157     perfMemory_exit();
 158     if (PrintSafepointStatistics) {
 159       // Print the collected safepoint statistics.
 160       SafepointSynchronize::print_stat_on_exit();
 161     }
 162     if (PrintStringTableStatistics) {
 163       SymbolTable::dump(tty);
 164       StringTable::dump(tty);
 165     }
 166     ostream_exit();
src/share/vm/runtime/init.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File