Mercurial > hg > truffle
annotate src/share/vm/runtime/init.cpp @ 1721:413ad0331a0c
6977924: Changes for 6975078 produce build error with certain gcc versions
Summary: The changes introduced for 6975078 assign badHeapOopVal to the _allocation field in the ResourceObj class. In 32 bit linux builds with certain versions of gcc this assignment will be flagged as an error while compiling allocation.cpp. In 32 bit builds the constant value badHeapOopVal (which is cast to an intptr_t) is negative. The _allocation field is typed as an unsigned intptr_t and gcc catches this as an error.
Reviewed-by: jcoomes, ysr, phh
author | johnc |
---|---|
date | Wed, 18 Aug 2010 10:59:06 -0700 |
parents | 2a47bd84841f |
children | f55c4f82ab9d |
rev | line source |
---|---|
0 | 1 /* |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1299
diff
changeset
|
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. |
0 | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | |
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 | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
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 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1299
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1299
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1299
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
25 # include "incls/_precompiled.incl" | |
26 # include "incls/_init.cpp.incl" | |
27 | |
28 // Initialization done by VM thread in vm_init_globals() | |
29 void check_ThreadShadow(); | |
30 void eventlog_init(); | |
31 void mutex_init(); | |
32 void chunkpool_init(); | |
33 void perfMemory_init(); | |
34 | |
35 // Initialization done by Java thread in init_globals() | |
36 void management_init(); | |
37 void bytecodes_init(); | |
38 void classLoader_init(); | |
39 void codeCache_init(); | |
40 void VM_Version_init(); | |
41 void stubRoutines_init1(); | |
42 jint universe_init(); // dependent on codeCache_init and stubRoutines_init | |
43 void interpreter_init(); // before any methods loaded | |
44 void invocationCounter_init(); // before any methods loaded | |
45 void marksweep_init(); | |
46 void accessFlags_init(); | |
47 void templateTable_init(); | |
48 void InterfaceSupport_init(); | |
49 void universe2_init(); // dependent on codeCache_init and stubRoutines_init | |
50 void referenceProcessor_init(); | |
51 void jni_handles_init(); | |
52 void vmStructs_init(); | |
53 | |
54 void vtableStubs_init(); | |
55 void InlineCacheBuffer_init(); | |
56 void compilerOracle_init(); | |
57 void compilationPolicy_init(); | |
58 | |
59 | |
60 // Initialization after compiler initialization | |
61 bool universe_post_init(); // must happen after compiler_init | |
62 void javaClasses_init(); // must happen after vtable initialization | |
63 void stubRoutines_init2(); // note: StubRoutines need 2-phase init | |
64 | |
65 // Do not disable thread-local-storage, as it is important for some | |
66 // JNI/JVM/JVMTI functions and signal handlers to work properly | |
67 // during VM shutdown | |
68 void perfMemory_exit(); | |
69 void ostream_exit(); | |
70 | |
71 void vm_init_globals() { | |
72 check_ThreadShadow(); | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
0
diff
changeset
|
73 basic_types_init(); |
0 | 74 eventlog_init(); |
75 mutex_init(); | |
76 chunkpool_init(); | |
77 perfMemory_init(); | |
78 } | |
79 | |
80 | |
81 jint init_globals() { | |
82 HandleMark hm; | |
83 management_init(); | |
84 bytecodes_init(); | |
85 classLoader_init(); | |
86 codeCache_init(); | |
87 VM_Version_init(); | |
88 stubRoutines_init1(); | |
89 jint status = universe_init(); // dependent on codeCache_init and stubRoutines_init | |
90 if (status != JNI_OK) | |
91 return status; | |
92 | |
93 interpreter_init(); // before any methods loaded | |
94 invocationCounter_init(); // before any methods loaded | |
95 marksweep_init(); | |
96 accessFlags_init(); | |
97 templateTable_init(); | |
98 InterfaceSupport_init(); | |
99 SharedRuntime::generate_stubs(); | |
100 universe2_init(); // dependent on codeCache_init and stubRoutines_init | |
101 referenceProcessor_init(); | |
102 jni_handles_init(); | |
103 #ifndef VM_STRUCTS_KERNEL | |
104 vmStructs_init(); | |
105 #endif // VM_STRUCTS_KERNEL | |
106 | |
107 vtableStubs_init(); | |
108 InlineCacheBuffer_init(); | |
109 compilerOracle_init(); | |
110 compilationPolicy_init(); | |
111 VMRegImpl::set_regName(); | |
112 | |
113 if (!universe_post_init()) { | |
114 return JNI_ERR; | |
115 } | |
116 javaClasses_init(); // must happen after vtable initialization | |
117 stubRoutines_init2(); // note: StubRoutines need 2-phase init | |
118 | |
1299
9eba43136cb5
6934494: JSR 292 MethodHandles adapters should be generated into their own CodeBlob
twisti
parents:
242
diff
changeset
|
119 // Generate MethodHandles adapters. |
9eba43136cb5
6934494: JSR 292 MethodHandles adapters should be generated into their own CodeBlob
twisti
parents:
242
diff
changeset
|
120 MethodHandles::generate_adapters(); |
9eba43136cb5
6934494: JSR 292 MethodHandles adapters should be generated into their own CodeBlob
twisti
parents:
242
diff
changeset
|
121 |
0 | 122 // Although we'd like to, we can't easily do a heap verify |
123 // here because the main thread isn't yet a JavaThread, so | |
124 // its TLAB may not be made parseable from the usual interfaces. | |
125 if (VerifyBeforeGC && !UseTLAB && | |
126 Universe::heap()->total_collections() >= VerifyGCStartAt) { | |
127 Universe::heap()->prepare_for_verify(); | |
128 Universe::verify(); // make sure we're starting with a clean slate | |
129 } | |
130 | |
131 return JNI_OK; | |
132 } | |
133 | |
134 | |
135 void exit_globals() { | |
136 static bool destructorsCalled = false; | |
137 if (!destructorsCalled) { | |
138 destructorsCalled = true; | |
139 perfMemory_exit(); | |
140 if (PrintSafepointStatistics) { | |
141 // Print the collected safepoint statistics. | |
142 SafepointSynchronize::print_stat_on_exit(); | |
143 } | |
144 ostream_exit(); | |
145 } | |
146 } | |
147 | |
148 | |
149 static bool _init_completed = false; | |
150 | |
151 bool is_init_completed() { | |
152 return _init_completed; | |
153 } | |
154 | |
155 | |
156 void set_init_completed() { | |
157 _init_completed = true; | |
158 } |