< prev index next >

src/hotspot/share/classfile/classLoader.cpp

Print this page

*** 1639,1657 **** ModuleEntryTable* null_cld_modules = null_cld->modules(); if (null_cld_modules == NULL) { vm_exit_during_initialization("No ModuleEntryTable for the boot class loader"); } ! if (ModuleEntryTable::javabase_moduleEntry() == NULL) { // may have been inited by CDS. MutexLocker ml(THREAD, Module_lock); ModuleEntry* jb_module = null_cld_modules->locked_create_entry(Handle(), false, vmSymbols::java_base(), NULL, NULL, null_cld); if (jb_module == NULL) { vm_exit_during_initialization("Unable to create ModuleEntry for " JAVA_BASE_NAME); } ModuleEntryTable::set_javabase_moduleEntry(jb_module); } } // Please keep following two functions at end of this file. With them placed at top or in middle of the file, // they could get inlined by agressive compiler, an unknown trick, see bug 6966589. void PerfClassTraceTime::initialize() { --- 1639,1659 ---- ModuleEntryTable* null_cld_modules = null_cld->modules(); if (null_cld_modules == NULL) { vm_exit_during_initialization("No ModuleEntryTable for the boot class loader"); } ! { MutexLocker ml(THREAD, Module_lock); + if (ModuleEntryTable::javabase_moduleEntry() == NULL) { // may have been inited by CDS. ModuleEntry* jb_module = null_cld_modules->locked_create_entry(Handle(), false, vmSymbols::java_base(), NULL, NULL, null_cld); if (jb_module == NULL) { vm_exit_during_initialization("Unable to create ModuleEntry for " JAVA_BASE_NAME); } ModuleEntryTable::set_javabase_moduleEntry(jb_module); } + } } // Please keep following two functions at end of this file. With them placed at top or in middle of the file, // they could get inlined by agressive compiler, an unknown trick, see bug 6966589. void PerfClassTraceTime::initialize() {
< prev index next >