1 /* |
1 /* |
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
45 void management_init(); |
45 void management_init(); |
46 void bytecodes_init(); |
46 void bytecodes_init(); |
47 void classLoader_init(); |
47 void classLoader_init(); |
48 void codeCache_init(); |
48 void codeCache_init(); |
49 void VM_Version_init(); |
49 void VM_Version_init(); |
|
50 void os_init_globals(); // depends on VM_Version_init, before universe_init |
50 void stubRoutines_init1(); |
51 void stubRoutines_init1(); |
51 jint universe_init(); // dependent on codeCache_init and stubRoutines_init |
52 jint universe_init(); // depends on codeCache_init and stubRoutines_init |
52 void interpreter_init(); // before any methods loaded |
53 void interpreter_init(); // before any methods loaded |
53 void invocationCounter_init(); // before any methods loaded |
54 void invocationCounter_init(); // before any methods loaded |
54 void marksweep_init(); |
55 void marksweep_init(); |
55 void accessFlags_init(); |
56 void accessFlags_init(); |
56 void templateTable_init(); |
57 void templateTable_init(); |
57 void InterfaceSupport_init(); |
58 void InterfaceSupport_init(); |
58 void universe2_init(); // dependent on codeCache_init and stubRoutines_init |
59 void universe2_init(); // dependent on codeCache_init and stubRoutines_init, loads primordial classes |
59 void referenceProcessor_init(); |
60 void referenceProcessor_init(); |
60 void jni_handles_init(); |
61 void jni_handles_init(); |
61 void vmStructs_init(); |
62 void vmStructs_init(); |
62 |
63 |
63 void vtableStubs_init(); |
64 void vtableStubs_init(); |
92 management_init(); |
93 management_init(); |
93 bytecodes_init(); |
94 bytecodes_init(); |
94 classLoader_init(); |
95 classLoader_init(); |
95 codeCache_init(); |
96 codeCache_init(); |
96 VM_Version_init(); |
97 VM_Version_init(); |
|
98 os_init_globals(); |
97 stubRoutines_init1(); |
99 stubRoutines_init1(); |
98 jint status = universe_init(); // dependent on codeCache_init and stubRoutines_init |
100 jint status = universe_init(); // dependent on codeCache_init and |
|
101 // stubRoutines_init1 |
99 if (status != JNI_OK) |
102 if (status != JNI_OK) |
100 return status; |
103 return status; |
101 |
104 |
102 interpreter_init(); // before any methods loaded |
105 interpreter_init(); // before any methods loaded |
103 invocationCounter_init(); // before any methods loaded |
106 invocationCounter_init(); // before any methods loaded |
104 marksweep_init(); |
107 marksweep_init(); |
105 accessFlags_init(); |
108 accessFlags_init(); |
106 templateTable_init(); |
109 templateTable_init(); |
107 InterfaceSupport_init(); |
110 InterfaceSupport_init(); |
108 SharedRuntime::generate_stubs(); |
111 SharedRuntime::generate_stubs(); |
109 universe2_init(); // dependent on codeCache_init and stubRoutines_init |
112 universe2_init(); // dependent on codeCache_init and stubRoutines_init1 |
110 referenceProcessor_init(); |
113 referenceProcessor_init(); |
111 jni_handles_init(); |
114 jni_handles_init(); |
112 #ifndef VM_STRUCTS_KERNEL |
115 #ifndef VM_STRUCTS_KERNEL |
113 vmStructs_init(); |
116 vmStructs_init(); |
114 #endif // VM_STRUCTS_KERNEL |
117 #endif // VM_STRUCTS_KERNEL |
120 VMRegImpl::set_regName(); |
123 VMRegImpl::set_regName(); |
121 |
124 |
122 if (!universe_post_init()) { |
125 if (!universe_post_init()) { |
123 return JNI_ERR; |
126 return JNI_ERR; |
124 } |
127 } |
125 javaClasses_init(); // must happen after vtable initialization |
128 javaClasses_init(); // must happen after vtable initialization |
126 stubRoutines_init2(); // note: StubRoutines need 2-phase init |
129 stubRoutines_init2(); // note: StubRoutines need 2-phase init |
127 |
130 |
128 // Although we'd like to, we can't easily do a heap verify |
131 // Although we'd like to, we can't easily do a heap verify |
129 // here because the main thread isn't yet a JavaThread, so |
132 // here because the main thread isn't yet a JavaThread, so |
130 // its TLAB may not be made parseable from the usual interfaces. |
133 // its TLAB may not be made parseable from the usual interfaces. |