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/classLoader.hpp"
27 #include "classfile/javaClasses.hpp"
28 #include "classfile/systemDictionary.hpp"
29 #include "classfile/vmSymbols.hpp"
30 #include "code/codeCache.hpp"
31 #include "code/codeCacheExtensions.hpp"
32 #include "code/scopeDesc.hpp"
33 #include "compiler/compileBroker.hpp"
34 #include "compiler/compileTask.hpp"
35 #include "gc/shared/gcId.hpp"
36 #include "gc/shared/gcLocker.inline.hpp"
37 #include "gc/shared/workgroup.hpp"
38 #include "interpreter/interpreter.hpp"
39 #include "interpreter/linkResolver.hpp"
40 #include "interpreter/oopMapCache.hpp"
41 #include "jvmtifiles/jvmtiEnv.hpp"
42 #include "logging/log.hpp"
43 #include "logging/logConfiguration.hpp"
44 #include "memory/metaspaceShared.hpp"
45 #include "memory/oopFactory.hpp"
46 #include "memory/universe.inline.hpp"
47 #include "oops/instanceKlass.hpp"
48 #include "oops/objArrayOop.hpp"
49 #include "oops/oop.inline.hpp"
50 #include "oops/symbol.hpp"
51 #include "oops/verifyOopClosure.hpp"
52 #include "prims/jvm_misc.hpp"
53 #include "prims/jvmtiExport.hpp"
54 #include "prims/jvmtiThreadState.hpp"
55 #include "prims/privilegedStack.hpp"
56 #include "runtime/arguments.hpp"
3633 // debug stuff, that does not work until all basic classes have been initialized.
3634 set_init_completed();
3635
3636 LogConfiguration::post_initialize();
3637 Metaspace::post_initialize();
3638
3639 HOTSPOT_VM_INIT_END();
3640
3641 // record VM initialization completion time
3642 #if INCLUDE_MANAGEMENT
3643 Management::record_vm_init_completed();
3644 #endif // INCLUDE_MANAGEMENT
3645
3646 // Compute system loader. Note that this has to occur after set_init_completed, since
3647 // valid exceptions may be thrown in the process.
3648 // Note that we do not use CHECK_0 here since we are inside an EXCEPTION_MARK and
3649 // set_init_completed has just been called, causing exceptions not to be shortcut
3650 // anymore. We call vm_exit_during_initialization directly instead.
3651 SystemDictionary::compute_java_system_loader(CHECK_(JNI_ERR));
3652
3653 #if INCLUDE_ALL_GCS
3654 // Support for ConcurrentMarkSweep. This should be cleaned up
3655 // and better encapsulated. The ugly nested if test would go away
3656 // once things are properly refactored. XXX YSR
3657 if (UseConcMarkSweepGC || UseG1GC) {
3658 if (UseConcMarkSweepGC) {
3659 ConcurrentMarkSweepThread::makeSurrogateLockerThread(CHECK_JNI_ERR);
3660 } else {
3661 ConcurrentMarkThread::makeSurrogateLockerThread(CHECK_JNI_ERR);
3662 }
3663 }
3664 #endif // INCLUDE_ALL_GCS
3665
3666 // Always call even when there are not JVMTI environments yet, since environments
3667 // may be attached late and JVMTI must track phases of VM execution
3668 JvmtiExport::enter_live_phase();
3669
3670 // Signal Dispatcher needs to be started before VMInit event is posted
3671 os::signal_init();
3672
3673 // Start Attach Listener if +StartAttachListener or it can't be started lazily
3674 if (!DisableAttachMechanism) {
3675 AttachListener::vm_start();
3676 if (StartAttachListener || AttachListener::init_at_startup()) {
3677 AttachListener::init();
3678 }
3679 }
3680
3681 // Launch -Xrun agents
3682 // Must be done in the JVMTI live phase so that for backward compatibility the JDWP
3683 // back-end can launch with -Xdebug -Xrunjdwp.
3684 if (!EagerXrunInit && Arguments::init_libraries_at_startup()) {
|
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/classLoader.hpp"
27 #include "classfile/javaClasses.hpp"
28 #include "classfile/systemDictionary.hpp"
29 #include "classfile/vmSymbols.hpp"
30 #include "code/codeCache.hpp"
31 #include "code/codeCacheExtensions.hpp"
32 #include "code/scopeDesc.hpp"
33 #include "compiler/compileBroker.hpp"
34 #include "compiler/compileTask.hpp"
35 #include "gc/shared/gcId.hpp"
36 #include "gc/shared/gcLocker.inline.hpp"
37 #include "gc/shared/referencePendingListLocker.hpp"
38 #include "gc/shared/workgroup.hpp"
39 #include "interpreter/interpreter.hpp"
40 #include "interpreter/linkResolver.hpp"
41 #include "interpreter/oopMapCache.hpp"
42 #include "jvmtifiles/jvmtiEnv.hpp"
43 #include "logging/log.hpp"
44 #include "logging/logConfiguration.hpp"
45 #include "memory/metaspaceShared.hpp"
46 #include "memory/oopFactory.hpp"
47 #include "memory/universe.inline.hpp"
48 #include "oops/instanceKlass.hpp"
49 #include "oops/objArrayOop.hpp"
50 #include "oops/oop.inline.hpp"
51 #include "oops/symbol.hpp"
52 #include "oops/verifyOopClosure.hpp"
53 #include "prims/jvm_misc.hpp"
54 #include "prims/jvmtiExport.hpp"
55 #include "prims/jvmtiThreadState.hpp"
56 #include "prims/privilegedStack.hpp"
57 #include "runtime/arguments.hpp"
3634 // debug stuff, that does not work until all basic classes have been initialized.
3635 set_init_completed();
3636
3637 LogConfiguration::post_initialize();
3638 Metaspace::post_initialize();
3639
3640 HOTSPOT_VM_INIT_END();
3641
3642 // record VM initialization completion time
3643 #if INCLUDE_MANAGEMENT
3644 Management::record_vm_init_completed();
3645 #endif // INCLUDE_MANAGEMENT
3646
3647 // Compute system loader. Note that this has to occur after set_init_completed, since
3648 // valid exceptions may be thrown in the process.
3649 // Note that we do not use CHECK_0 here since we are inside an EXCEPTION_MARK and
3650 // set_init_completed has just been called, causing exceptions not to be shortcut
3651 // anymore. We call vm_exit_during_initialization directly instead.
3652 SystemDictionary::compute_java_system_loader(CHECK_(JNI_ERR));
3653
3654 // Initialize reference pending list locker
3655 bool needs_locker_thread = Universe::heap()->needs_reference_pending_list_locker_thread();
3656 ReferencePendingListLocker::initialize(needs_locker_thread, CHECK_JNI_ERR);
3657
3658 // Always call even when there are not JVMTI environments yet, since environments
3659 // may be attached late and JVMTI must track phases of VM execution
3660 JvmtiExport::enter_live_phase();
3661
3662 // Signal Dispatcher needs to be started before VMInit event is posted
3663 os::signal_init();
3664
3665 // Start Attach Listener if +StartAttachListener or it can't be started lazily
3666 if (!DisableAttachMechanism) {
3667 AttachListener::vm_start();
3668 if (StartAttachListener || AttachListener::init_at_startup()) {
3669 AttachListener::init();
3670 }
3671 }
3672
3673 // Launch -Xrun agents
3674 // Must be done in the JVMTI live phase so that for backward compatibility the JDWP
3675 // back-end can launch with -Xdebug -Xrunjdwp.
3676 if (!EagerXrunInit && Arguments::init_libraries_at_startup()) {
|