author | mdoerr |
Tue, 05 Nov 2019 11:53:46 +0100 | |
changeset 58932 | 8623f75be895 |
parent 52325 | 0451e0a2f1f5 |
permissions | -rw-r--r-- |
1 | 1 |
/* |
50113 | 2 |
* Copyright (c) 1999, 2018, 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" |
|
50113 | 36 |
#include "jfr/support/jfrIntrinsics.hpp" |
7397 | 37 |
#include "memory/allocation.hpp" |
38 |
#include "memory/allocation.inline.hpp" |
|
39 |
#include "memory/resourceArea.hpp" |
|
40 |
#include "prims/nativeLookup.hpp" |
|
41 |
#include "runtime/arguments.hpp" |
|
49449
ef5d5d343e2a
8199263: Split interfaceSupport.hpp to not require including .inline.hpp files
coleenp
parents:
47767
diff
changeset
|
42 |
#include "runtime/interfaceSupport.inline.hpp" |
7397 | 43 |
#include "runtime/sharedRuntime.hpp" |
46502
116a09d8f142
8180755: Remove use of bitMap.inline.hpp include from instanceKlass.hpp and c1_ValueSet.hpp
tschatzl
parents:
46458
diff
changeset
|
44 |
#include "utilities/bitMap.inline.hpp" |
50113 | 45 |
#include "utilities/macros.hpp" |
1 | 46 |
|
47 |
||
42040
70ec5a09a0d5
8166377: is_compiled_by_jvmci hot in some profiles - improve nmethod compiler type detection
neliasso
parents:
42037
diff
changeset
|
48 |
Compiler::Compiler() : AbstractCompiler(compiler_c1) { |
22236 | 49 |
} |
1 | 50 |
|
20707
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
51 |
void Compiler::init_c1_runtime() { |
5707 | 52 |
BufferBlob* buffer_blob = CompilerThread::current()->get_buffer_blob(); |
25946 | 53 |
Arena* arena = new (mtCompiler) Arena(mtCompiler); |
5707 | 54 |
Runtime1::initialize(buffer_blob); |
55 |
FrameMap::initialize(); |
|
56 |
// initialize data structures |
|
57 |
ValueType::initialize(arena); |
|
58 |
GraphBuilder::initialize(); |
|
59 |
// note: to use more than one instance of LinearScan at a time this function call has to |
|
60 |
// be moved somewhere outside of this constructor: |
|
61 |
Interval::initialize(arena); |
|
62 |
} |
|
63 |
||
64 |
||
1 | 65 |
void Compiler::initialize() { |
20707
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
66 |
// Buffer blob must be allocated per C1 compiler thread at startup |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
67 |
BufferBlob* buffer_blob = init_buffer_blob(); |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
68 |
|
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
69 |
if (should_perform_init()) { |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
70 |
if (buffer_blob == NULL) { |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
71 |
// 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
|
72 |
// can be shut down. |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
73 |
set_state(failed); |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
74 |
} else { |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
75 |
init_c1_runtime(); |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
76 |
set_state(initialized); |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
77 |
} |
1 | 78 |
} |
79 |
} |
|
80 |
||
26796 | 81 |
int Compiler::code_buffer_size() { |
82 |
return Compilation::desired_max_code_buffer_size() + Compilation::desired_max_constant_size(); |
|
83 |
} |
|
84 |
||
20707
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
85 |
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
|
86 |
// 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
|
87 |
// 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
|
88 |
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
|
89 |
|
5707 | 90 |
// setup CodeBuffer. Preallocate a BufferBlob of size |
91 |
// NMethodSizeLimit plus some extra space for constants. |
|
52325
0451e0a2f1f5
8177899: Tests fail due to code cache exhaustion on machines with many cores
thartmann
parents:
52220
diff
changeset
|
92 |
BufferBlob* buffer_blob = BufferBlob::create("C1 temporary CodeBuffer", code_buffer_size()); |
20707
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
93 |
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
|
94 |
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
|
95 |
} |
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 |
return buffer_blob; |
5707 | 98 |
} |
99 |
||
33593
60764a78fa5c
8140274: methodHandles and constantPoolHandles should be passed as const references
coleenp
parents:
32582
diff
changeset
|
100 |
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
|
101 |
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
|
102 |
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
|
103 |
|
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
104 |
if (method->is_synchronized()) { |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
105 |
// 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
|
106 |
return false; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
107 |
} |
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 |
switch (id) { |
45514
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
42040
diff
changeset
|
110 |
case vmIntrinsics::_compareAndSetLong: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
111 |
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
|
112 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
113 |
case vmIntrinsics::_getAndAddInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
114 |
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
|
115 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
116 |
case vmIntrinsics::_getAndAddLong: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
117 |
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
|
118 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
119 |
case vmIntrinsics::_getAndSetInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
120 |
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
|
121 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
122 |
case vmIntrinsics::_getAndSetLong: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
123 |
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
|
124 |
break; |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
50113
diff
changeset
|
125 |
case vmIntrinsics::_getAndSetReference: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
126 |
#ifdef _LP64 |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
127 |
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
|
128 |
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
|
129 |
#else |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
130 |
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
|
131 |
#endif |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
132 |
break; |
38017
55047d16f141
8147844: new method j.l.Runtime.onSpinWait() and the corresponding x86 hotspot instrinsic
ikrylov
parents:
36827
diff
changeset
|
133 |
case vmIntrinsics::_onSpinWait: |
55047d16f141
8147844: new method j.l.Runtime.onSpinWait() and the corresponding x86 hotspot instrinsic
ikrylov
parents:
36827
diff
changeset
|
134 |
if (!VM_Version::supports_on_spin_wait()) return false; |
55047d16f141
8147844: new method j.l.Runtime.onSpinWait() and the corresponding x86 hotspot instrinsic
ikrylov
parents:
36827
diff
changeset
|
135 |
break; |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
136 |
case vmIntrinsics::_arraycopy: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
137 |
case vmIntrinsics::_currentTimeMillis: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
138 |
case vmIntrinsics::_nanoTime: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
139 |
case vmIntrinsics::_Reference_get: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
140 |
// 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
|
141 |
// 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
|
142 |
// 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
|
143 |
// 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
|
144 |
case vmIntrinsics::_loadFence: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
145 |
case vmIntrinsics::_storeFence: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
146 |
case vmIntrinsics::_fullFence: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
147 |
case vmIntrinsics::_floatToRawIntBits: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
148 |
case vmIntrinsics::_intBitsToFloat: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
149 |
case vmIntrinsics::_doubleToRawLongBits: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
150 |
case vmIntrinsics::_longBitsToDouble: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
151 |
case vmIntrinsics::_getClass: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
152 |
case vmIntrinsics::_isInstance: |
36552 | 153 |
case vmIntrinsics::_isPrimitive: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
154 |
case vmIntrinsics::_currentThread: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
155 |
case vmIntrinsics::_dabs: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
156 |
case vmIntrinsics::_dsqrt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
157 |
case vmIntrinsics::_dsin: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
158 |
case vmIntrinsics::_dcos: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
159 |
case vmIntrinsics::_dtan: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
160 |
case vmIntrinsics::_dlog: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
161 |
case vmIntrinsics::_dlog10: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
162 |
case vmIntrinsics::_dexp: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
163 |
case vmIntrinsics::_dpow: |
41323 | 164 |
case vmIntrinsics::_fmaD: |
165 |
case vmIntrinsics::_fmaF: |
|
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
50113
diff
changeset
|
166 |
case vmIntrinsics::_getReference: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
167 |
case vmIntrinsics::_getBoolean: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
168 |
case vmIntrinsics::_getByte: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
169 |
case vmIntrinsics::_getShort: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
170 |
case vmIntrinsics::_getChar: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
171 |
case vmIntrinsics::_getInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
172 |
case vmIntrinsics::_getLong: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
173 |
case vmIntrinsics::_getFloat: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
174 |
case vmIntrinsics::_getDouble: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
50113
diff
changeset
|
175 |
case vmIntrinsics::_putReference: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
176 |
case vmIntrinsics::_putBoolean: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
177 |
case vmIntrinsics::_putByte: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
178 |
case vmIntrinsics::_putShort: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
179 |
case vmIntrinsics::_putChar: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
180 |
case vmIntrinsics::_putInt: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
181 |
case vmIntrinsics::_putLong: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
182 |
case vmIntrinsics::_putFloat: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
183 |
case vmIntrinsics::_putDouble: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
50113
diff
changeset
|
184 |
case vmIntrinsics::_getReferenceVolatile: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
185 |
case vmIntrinsics::_getBooleanVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
186 |
case vmIntrinsics::_getByteVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
187 |
case vmIntrinsics::_getShortVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
188 |
case vmIntrinsics::_getCharVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
189 |
case vmIntrinsics::_getIntVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
190 |
case vmIntrinsics::_getLongVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
191 |
case vmIntrinsics::_getFloatVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
192 |
case vmIntrinsics::_getDoubleVolatile: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
50113
diff
changeset
|
193 |
case vmIntrinsics::_putReferenceVolatile: |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
194 |
case vmIntrinsics::_putBooleanVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
195 |
case vmIntrinsics::_putByteVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
196 |
case vmIntrinsics::_putShortVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
197 |
case vmIntrinsics::_putCharVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
198 |
case vmIntrinsics::_putIntVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
199 |
case vmIntrinsics::_putLongVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
200 |
case vmIntrinsics::_putFloatVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
201 |
case vmIntrinsics::_putDoubleVolatile: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
202 |
case vmIntrinsics::_getShortUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
203 |
case vmIntrinsics::_getCharUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
204 |
case vmIntrinsics::_getIntUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
205 |
case vmIntrinsics::_getLongUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
206 |
case vmIntrinsics::_putShortUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
207 |
case vmIntrinsics::_putCharUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
208 |
case vmIntrinsics::_putIntUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
209 |
case vmIntrinsics::_putLongUnaligned: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
210 |
case vmIntrinsics::_checkIndex: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
211 |
case vmIntrinsics::_updateCRC32: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
212 |
case vmIntrinsics::_updateBytesCRC32: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
213 |
case vmIntrinsics::_updateByteBufferCRC32: |
47767
107622f2695c
8189745: AARCH64: Use CRC32C intrinsic code in interpreter and C1
dchuyko
parents:
47216
diff
changeset
|
214 |
#if defined(SPARC) || defined(S390) || defined(PPC64) || defined(AARCH64) |
38237
d972e3a2df53
8155162: java.util.zip.CRC32C Interpreter/C1 intrinsics support on SPARC
kvn
parents:
38017
diff
changeset
|
215 |
case vmIntrinsics::_updateBytesCRC32C: |
d972e3a2df53
8155162: java.util.zip.CRC32C Interpreter/C1 intrinsics support on SPARC
kvn
parents:
38017
diff
changeset
|
216 |
case vmIntrinsics::_updateDirectByteBufferCRC32C: |
d972e3a2df53
8155162: java.util.zip.CRC32C Interpreter/C1 intrinsics support on SPARC
kvn
parents:
38017
diff
changeset
|
217 |
#endif |
38238
1bbcc430c78d
8151268: Wire up the x86 _vectorizedMismatch stub routine in C1
psandoz
parents:
38237
diff
changeset
|
218 |
case vmIntrinsics::_vectorizedMismatch: |
45514
0fc9cc73ce45
8181292: Backport Rename internal Unsafe.compare methods from 10 to 9
psandoz
parents:
42040
diff
changeset
|
219 |
case vmIntrinsics::_compareAndSetInt: |
52220
9c260a6b6471
8207146: Rename jdk.internal.misc.Unsafe::xxxObject to xxxReference
mchung
parents:
50113
diff
changeset
|
220 |
case vmIntrinsics::_compareAndSetReference: |
33628 | 221 |
case vmIntrinsics::_getCharStringU: |
222 |
case vmIntrinsics::_putCharStringU: |
|
50113 | 223 |
#ifdef JFR_HAVE_INTRINSICS |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
224 |
case vmIntrinsics::_counterTime: |
50113 | 225 |
case vmIntrinsics::_getEventWriter: |
226 |
#if defined(_LP64) || !defined(TRACE_ID_SHIFT) |
|
40899
d7140c75c2c6
8163589: Add back class id intrinsic method for event based tracing
rehn
parents:
38246
diff
changeset
|
227 |
case vmIntrinsics::_getClassId: |
d7140c75c2c6
8163589: Add back class id intrinsic method for event based tracing
rehn
parents:
38246
diff
changeset
|
228 |
#endif |
31962
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
229 |
#endif |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
230 |
break; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
231 |
default: |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
232 |
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
|
233 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
234 |
|
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
235 |
return true; |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
236 |
} |
d05e0a4d1b43
8130832: Extend the WhiteBox API to provide information about the availability of compiler intrinsics
zmajo
parents:
26796
diff
changeset
|
237 |
|
33451
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32582
diff
changeset
|
238 |
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
|
239 |
BufferBlob* buffer_blob = CompilerThread::current()->get_buffer_blob(); |
b3b658c6d1f8
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
anoll
parents:
17623
diff
changeset
|
240 |
assert(buffer_blob != NULL, "Must exist"); |
1 | 241 |
// invoke compilation |
242 |
{ |
|
243 |
// We are nested here because we need for the destructor |
|
244 |
// of Compilation to occur before we release the any |
|
245 |
// competing compiler thread |
|
246 |
ResourceMark rm; |
|
33451
0712796e4039
8137167: JEP165: Compiler Control: Implementation task
neliasso
parents:
32582
diff
changeset
|
247 |
Compilation c(this, env, method, entry_bci, buffer_blob, directive); |
1 | 248 |
} |
249 |
} |
|
250 |
||
251 |
||
252 |
void Compiler::print_timers() { |
|
253 |
Compilation::print_timers(); |
|
254 |
} |