1624 strcpy(orig_copy, orig);
1625 if ((CanonicalizeEntry)(os::native_path(orig_copy), out, len) < 0) {
1626 return false;
1627 }
1628 return true;
1629 }
1630
1631 void ClassLoader::create_javabase() {
1632 Thread* THREAD = Thread::current();
1633
1634 // Create java.base's module entry for the boot
1635 // class loader prior to loading j.l.Ojbect.
1636 ClassLoaderData* null_cld = ClassLoaderData::the_null_class_loader_data();
1637
1638 // Get module entry table
1639 ModuleEntryTable* null_cld_modules = null_cld->modules();
1640 if (null_cld_modules == NULL) {
1641 vm_exit_during_initialization("No ModuleEntryTable for the boot class loader");
1642 }
1643
1644 {
1645 MutexLocker ml(THREAD, Module_lock);
1646 ModuleEntry* jb_module = null_cld_modules->locked_create_entry(Handle(),
1647 false, vmSymbols::java_base(), NULL, NULL, null_cld);
1648 if (jb_module == NULL) {
1649 vm_exit_during_initialization("Unable to create ModuleEntry for " JAVA_BASE_NAME);
1650 }
1651 ModuleEntryTable::set_javabase_moduleEntry(jb_module);
1652 }
1653 }
1654
1655 // Please keep following two functions at end of this file. With them placed at top or in middle of the file,
1656 // they could get inlined by agressive compiler, an unknown trick, see bug 6966589.
1657 void PerfClassTraceTime::initialize() {
1658 if (!UsePerfData) return;
1659
1660 if (_eventp != NULL) {
1661 // increment the event counter
1662 _eventp->inc();
1663 }
1664
|
1624 strcpy(orig_copy, orig);
1625 if ((CanonicalizeEntry)(os::native_path(orig_copy), out, len) < 0) {
1626 return false;
1627 }
1628 return true;
1629 }
1630
1631 void ClassLoader::create_javabase() {
1632 Thread* THREAD = Thread::current();
1633
1634 // Create java.base's module entry for the boot
1635 // class loader prior to loading j.l.Ojbect.
1636 ClassLoaderData* null_cld = ClassLoaderData::the_null_class_loader_data();
1637
1638 // Get module entry table
1639 ModuleEntryTable* null_cld_modules = null_cld->modules();
1640 if (null_cld_modules == NULL) {
1641 vm_exit_during_initialization("No ModuleEntryTable for the boot class loader");
1642 }
1643
1644 if (ModuleEntryTable::javabase_moduleEntry() == NULL) { // may have been inited by CDS.
1645 MutexLocker ml(THREAD, Module_lock);
1646 ModuleEntry* jb_module = null_cld_modules->locked_create_entry(Handle(),
1647 false, vmSymbols::java_base(), NULL, NULL, null_cld);
1648 if (jb_module == NULL) {
1649 vm_exit_during_initialization("Unable to create ModuleEntry for " JAVA_BASE_NAME);
1650 }
1651 ModuleEntryTable::set_javabase_moduleEntry(jb_module);
1652 }
1653 }
1654
1655 // Please keep following two functions at end of this file. With them placed at top or in middle of the file,
1656 // they could get inlined by agressive compiler, an unknown trick, see bug 6966589.
1657 void PerfClassTraceTime::initialize() {
1658 if (!UsePerfData) return;
1659
1660 if (_eventp != NULL) {
1661 // increment the event counter
1662 _eventp->inc();
1663 }
1664
|