author | mdoerr |
Wed, 23 Mar 2016 15:35:38 -0700 | |
changeset 36817 | 57ce0a76b6b0 |
parent 36559 | b35fcd3da015 |
child 36827 | 53d2d43551d2 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
33593
60764a78fa5c
8140274: methodHandles and constantPoolHandles should be passed as const references
coleenp
parents:
32582
diff
changeset
|
2 |
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. |
1 | 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 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
7397 | 25 |
#include "precompiled.hpp" |
26 |
#include "c1/c1_Compilation.hpp" |
|
27 |
#include "c1/c1_Compiler.hpp" |
|
28 |
#include "c1/c1_FrameMap.hpp" |
|
29 |
#include "c1/c1_GraphBuilder.hpp" |
|
30 |
#include "c1/c1_LinearScan.hpp" |
|
31 |
#include "c1/c1_MacroAssembler.hpp" |
|
32 |
#include "c1/c1_Runtime1.hpp" |
|
33 |
#include "c1/c1_ValueType.hpp" |
|
34 |
#include "compiler/compileBroker.hpp" |
|
35 |
#include "interpreter/linkResolver.hpp" |
|
36 |
#include "memory/allocation.hpp" |
|
37 |
#include "memory/allocation.inline.hpp" |
|
38 |
#include "memory/resourceArea.hpp" |
|
39 |
#include "prims/nativeLookup.hpp" |
|
40 |
#include "runtime/arguments.hpp" |
|
41 |
#include "runtime/interfaceSupport.hpp" |
|
42 |
#include "runtime/sharedRuntime.hpp" |
|
1 | 43 |
|
44 |
||
22236 | 45 |
Compiler::Compiler() : AbstractCompiler(c1) { |
46 |
} |
|
1 | 47 |
|
20707
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
48 |
void Compiler::init_c1_runtime() { |
5707 | 49 |
BufferBlob* buffer_blob = CompilerThread::current()->get_buffer_blob(); |
25946 | 50 |
Arena* arena = new (mtCompiler) Arena(mtCompiler); |
5707 | 51 |
Runtime1::initialize(buffer_blob); |
52 |
FrameMap::initialize(); |
|
53 |
// initialize data structures |
|
54 |
ValueType::initialize(arena); |
|
55 |
GraphBuilder::initialize(); |
|
56 |
// note: to use more than one instance of LinearScan at a time this function call has to |
|
57 |
// be moved somewhere outside of this constructor: |
|
58 |
Interval::initialize(arena); |
|
59 |
} |
|
60 |
||
61 |
||
1 | 62 |
void Compiler::initialize() { |
20707
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
63 |
// Buffer blob must be allocated per C1 compiler thread at startup |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
64 |
BufferBlob* buffer_blob = init_buffer_blob(); |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
65 |
|
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
66 |
if (should_perform_init()) { |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
67 |
if (buffer_blob == NULL) { |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
68 |
// When we come here we are in state 'initializing'; entire C1 compilation |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
69 |
// can be shut down. |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
70 |
set_state(failed); |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
71 |
} else { |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
72 |
init_c1_runtime(); |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
73 |
set_state(initialized); |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
74 |
} |
1 | 75 |
} |
76 |
} |
|
77 |
||
26796 | 78 |
int Compiler::code_buffer_size() { |
79 |
assert(SegmentedCodeCache, "Should be only used with a segmented code cache"); |
|
80 |
return Compilation::desired_max_code_buffer_size() + Compilation::desired_max_constant_size(); |
|
81 |
} |
|
82 |
||
20707
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
83 |
BufferBlob* Compiler::init_buffer_blob() { |
17623
6295813086d0
8014430: JRE crashes instead of stop compilation on full Code Cache. Internal Error (c1_Compiler.cpp:87)
anoll
parents:
13963
diff
changeset
|
84 |
// Allocate buffer blob once at startup since allocation for each |
6295813086d0
8014430: JRE crashes instead of stop compilation on full Code Cache. Internal Error (c1_Compiler.cpp:87)
anoll
parents:
13963
diff
changeset
|
85 |
// compilation seems to be too expensive (at least on Intel win32). |
20707
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
86 |
assert (CompilerThread::current()->get_buffer_blob() == NULL, "Should initialize only once"); |
17623
6295813086d0
8014430: JRE crashes instead of stop compilation on full Code Cache. Internal Error (c1_Compiler.cpp:87)
anoll
parents:
13963
diff
changeset
|
87 |
|
5707 | 88 |
// setup CodeBuffer. Preallocate a BufferBlob of size |
89 |
// NMethodSizeLimit plus some extra space for constants. |
|
90 |
int code_buffer_size = Compilation::desired_max_code_buffer_size() + |
|
91 |
Compilation::desired_max_constant_size(); |
|
17623
6295813086d0
8014430: JRE crashes instead of stop compilation on full Code Cache. Internal Error (c1_Compiler.cpp:87)
anoll
parents:
13963
diff
changeset
|
92 |
|
20707
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
93 |
BufferBlob* buffer_blob = BufferBlob::create("C1 temporary CodeBuffer", code_buffer_size); |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
94 |
if (buffer_blob != NULL) { |
17623
6295813086d0
8014430: JRE crashes instead of stop compilation on full Code Cache. Internal Error (c1_Compiler.cpp:87)
anoll
parents:
13963
diff
changeset
|
95 |
CompilerThread::current()->set_buffer_blob(buffer_blob); |
6295813086d0
8014430: JRE crashes instead of stop compilation on full Code Cache. Internal Error (c1_Compiler.cpp:87)
anoll
parents:
13963
diff
changeset
|
96 |
} |
6295813086d0
8014430: JRE crashes instead of stop compilation on full Code Cache. Internal Error (c1_Compiler.cpp:87)
anoll
parents:
13963
diff
changeset
|
97 |
|
6295813086d0
8014430: JRE crashes instead of stop compilation on full Code Cache. Internal Error (c1_Compiler.cpp:87)
anoll
parents:
13963
diff
changeset
|
98 |
return buffer_blob; |
5707 | 99 |
} |
100 |
||
33593
60764a78fa5c
8140274: methodHandles and constantPoolHandles should be passed as const references
coleenp
parents:
32582
diff
changeset
|
101 |
bool Compiler::is_intrinsic_supported(const methodHandle& method) { |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
102 |
vmIntrinsics::ID id = method->intrinsic_id(); |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
103 |
assert(id != vmIntrinsics::_none, "must be a VM intrinsic"); |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
104 |
|
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
105 |
if (method->is_synchronized()) { |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
106 |
// C1 does not support intrinsification of synchronized methods. |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
107 |
return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
108 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
109 |
|
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
110 |
switch (id) { |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
111 |
case vmIntrinsics::_compareAndSwapLong: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
112 |
if (!VM_Version::supports_cx8()) return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
113 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
114 |
case vmIntrinsics::_getAndAddInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
115 |
if (!VM_Version::supports_atomic_getadd4()) return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
116 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
117 |
case vmIntrinsics::_getAndAddLong: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
118 |
if (!VM_Version::supports_atomic_getadd8()) return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
119 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
120 |
case vmIntrinsics::_getAndSetInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
121 |
if (!VM_Version::supports_atomic_getset4()) return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
122 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
123 |
case vmIntrinsics::_getAndSetLong: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
124 |
if (!VM_Version::supports_atomic_getset8()) return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
125 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
126 |
case vmIntrinsics::_getAndSetObject: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
127 |
#ifdef _LP64 |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
128 |
if (!UseCompressedOops && !VM_Version::supports_atomic_getset8()) return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
129 |
if (UseCompressedOops && !VM_Version::supports_atomic_getset4()) return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
130 |
#else |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
131 |
if (!VM_Version::supports_atomic_getset4()) return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
132 |
#endif |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
133 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
134 |
case vmIntrinsics::_arraycopy: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
135 |
case vmIntrinsics::_currentTimeMillis: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
136 |
case vmIntrinsics::_nanoTime: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
137 |
case vmIntrinsics::_Reference_get: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
138 |
// Use the intrinsic version of Reference.get() so that the value in |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
139 |
// the referent field can be registered by the G1 pre-barrier code. |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
140 |
// Also to prevent commoning reads from this field across safepoint |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
141 |
// since GC can change its value. |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
142 |
case vmIntrinsics::_loadFence: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
143 |
case vmIntrinsics::_storeFence: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
144 |
case vmIntrinsics::_fullFence: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
145 |
case vmIntrinsics::_floatToRawIntBits: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
146 |
case vmIntrinsics::_intBitsToFloat: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
147 |
case vmIntrinsics::_doubleToRawLongBits: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
148 |
case vmIntrinsics::_longBitsToDouble: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
149 |
case vmIntrinsics::_getClass: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
150 |
case vmIntrinsics::_isInstance: |
36552 | 151 |
case vmIntrinsics::_isPrimitive: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
152 |
case vmIntrinsics::_currentThread: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
153 |
case vmIntrinsics::_dabs: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
154 |
case vmIntrinsics::_dsqrt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
155 |
case vmIntrinsics::_dsin: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
156 |
case vmIntrinsics::_dcos: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
157 |
case vmIntrinsics::_dtan: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
158 |
case vmIntrinsics::_dlog: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
159 |
case vmIntrinsics::_dlog10: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
160 |
case vmIntrinsics::_dexp: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
161 |
case vmIntrinsics::_dpow: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
162 |
case vmIntrinsics::_getObject: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
163 |
case vmIntrinsics::_getBoolean: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
164 |
case vmIntrinsics::_getByte: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
165 |
case vmIntrinsics::_getShort: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
166 |
case vmIntrinsics::_getChar: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
167 |
case vmIntrinsics::_getInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
168 |
case vmIntrinsics::_getLong: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
169 |
case vmIntrinsics::_getFloat: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
170 |
case vmIntrinsics::_getDouble: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
171 |
case vmIntrinsics::_putObject: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
172 |
case vmIntrinsics::_putBoolean: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
173 |
case vmIntrinsics::_putByte: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
174 |
case vmIntrinsics::_putShort: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
175 |
case vmIntrinsics::_putChar: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
176 |
case vmIntrinsics::_putInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
177 |
case vmIntrinsics::_putLong: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
178 |
case vmIntrinsics::_putFloat: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
179 |
case vmIntrinsics::_putDouble: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
180 |
case vmIntrinsics::_getObjectVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
181 |
case vmIntrinsics::_getBooleanVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
182 |
case vmIntrinsics::_getByteVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
183 |
case vmIntrinsics::_getShortVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
184 |
case vmIntrinsics::_getCharVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
185 |
case vmIntrinsics::_getIntVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
186 |
case vmIntrinsics::_getLongVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
187 |
case vmIntrinsics::_getFloatVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
188 |
case vmIntrinsics::_getDoubleVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
189 |
case vmIntrinsics::_putObjectVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
190 |
case vmIntrinsics::_putBooleanVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
191 |
case vmIntrinsics::_putByteVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
192 |
case vmIntrinsics::_putShortVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
193 |
case vmIntrinsics::_putCharVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
194 |
case vmIntrinsics::_putIntVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
195 |
case vmIntrinsics::_putLongVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
196 |
case vmIntrinsics::_putFloatVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
197 |
case vmIntrinsics::_putDoubleVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
198 |
case vmIntrinsics::_getByte_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
199 |
case vmIntrinsics::_getShort_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
200 |
case vmIntrinsics::_getChar_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
201 |
case vmIntrinsics::_getInt_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
202 |
case vmIntrinsics::_getLong_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
203 |
case vmIntrinsics::_getFloat_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
204 |
case vmIntrinsics::_getDouble_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
205 |
case vmIntrinsics::_putByte_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
206 |
case vmIntrinsics::_putShort_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
207 |
case vmIntrinsics::_putChar_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
208 |
case vmIntrinsics::_putInt_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
209 |
case vmIntrinsics::_putLong_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
210 |
case vmIntrinsics::_putFloat_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
211 |
case vmIntrinsics::_putDouble_raw: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
212 |
case vmIntrinsics::_putOrderedObject: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
213 |
case vmIntrinsics::_putOrderedInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
214 |
case vmIntrinsics::_putOrderedLong: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
215 |
case vmIntrinsics::_getShortUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
216 |
case vmIntrinsics::_getCharUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
217 |
case vmIntrinsics::_getIntUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
218 |
case vmIntrinsics::_getLongUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
219 |
case vmIntrinsics::_putShortUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
220 |
case vmIntrinsics::_putCharUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
221 |
case vmIntrinsics::_putIntUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
222 |
case vmIntrinsics::_putLongUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
223 |
case vmIntrinsics::_checkIndex: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
224 |
case vmIntrinsics::_updateCRC32: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
225 |
case vmIntrinsics::_updateBytesCRC32: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
226 |
case vmIntrinsics::_updateByteBufferCRC32: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
227 |
case vmIntrinsics::_compareAndSwapInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
228 |
case vmIntrinsics::_compareAndSwapObject: |
33628 | 229 |
case vmIntrinsics::_getCharStringU: |
230 |
case vmIntrinsics::_putCharStringU: |
|
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
231 |
#ifdef TRACE_HAVE_INTRINSICS |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
232 |
case vmIntrinsics::_counterTime: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
233 |
#endif |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
234 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
235 |
default: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
236 |
return false; // Intrinsics not on the previous list are not available. |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
237 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
238 |
|
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
239 |
return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
240 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
241 |
|
33451
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32582
diff
changeset
|
242 |
void Compiler::compile_method(ciEnv* env, ciMethod* method, int entry_bci, DirectiveSet* directive) { |
20707
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
243 |
BufferBlob* buffer_blob = CompilerThread::current()->get_buffer_blob(); |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
244 |
assert(buffer_blob != NULL, "Must exist"); |
1 | 245 |
// invoke compilation |
246 |
{ |
|
247 |
// We are nested here because we need for the destructor |
|
248 |
// of Compilation to occur before we release the any |
|
249 |
// competing compiler thread |
|
250 |
ResourceMark rm; |
|
33451
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32582
diff
changeset
|
251 |
Compilation c(this, env, method, entry_bci, buffer_blob, directive); |
1 | 252 |
} |
253 |
} |
|
254 |
||
255 |
||
256 |
void Compiler::print_timers() { |
|
257 |
Compilation::print_timers(); |
|
258 |
} |