author | kvn |
Wed, 01 May 2019 12:31:29 -0700 | |
changeset 54669 | ad45b3802d4e |
parent 53244 | 9807daeb47c4 |
child 55293 | d19dc5b10fbb |
permissions | -rw-r--r-- |
33160 | 1 |
/* |
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
52381
diff
changeset
|
2 |
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
33160 | 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 |
* |
|
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 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
52381
diff
changeset
|
24 |
#ifndef SHARE_JVMCI_JVMCICODEINSTALLER_HPP |
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
52381
diff
changeset
|
25 |
#define SHARE_JVMCI_JVMCICODEINSTALLER_HPP |
33160 | 26 |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
27 |
#include "code/debugInfoRec.hpp" |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
28 |
#include "code/exceptionHandlerTable.hpp" |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
29 |
#include "code/nativeInst.hpp" |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
30 |
#include "jvmci/jvmci.hpp" |
33160 | 31 |
#include "jvmci/jvmciEnv.hpp" |
32 |
||
52381
7f90bc64b0fc
8213203: [JVMCI] adopt formatting changes from jvmci 8
never
parents:
50729
diff
changeset
|
33 |
#if INCLUDE_AOT |
33160 | 34 |
class RelocBuffer : public StackObj { |
35 |
enum { stack_size = 1024 }; |
|
36 |
public: |
|
37 |
RelocBuffer() : _size(0), _buffer(0) {} |
|
38 |
~RelocBuffer(); |
|
39 |
void ensure_size(size_t bytes); |
|
40 |
void set_size(size_t bytes); |
|
41 |
address begin() const; |
|
42 |
size_t size() const { return _size; } |
|
43 |
private: |
|
44 |
size_t _size; |
|
45 |
char _static_buffer[stack_size]; |
|
46 |
char *_buffer; |
|
47 |
}; |
|
48 |
||
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
49 |
class CodeInstaller; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
50 |
|
42650 | 51 |
class AOTOopRecorder : public OopRecorder { |
52 |
public: |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
53 |
AOTOopRecorder(CodeInstaller* code_inst, Arena* arena = NULL, bool deduplicate = false); |
42650 | 54 |
|
55 |
virtual int find_index(Metadata* h); |
|
56 |
virtual int find_index(jobject h); |
|
47668 | 57 |
int nr_meta_refs() const; |
58 |
jobject meta_element(int pos) const; |
|
42650 | 59 |
|
60 |
private: |
|
47668 | 61 |
void record_meta_ref(jobject ref, int index); |
42650 | 62 |
|
47668 | 63 |
GrowableArray<jobject>* _meta_refs; |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
64 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
65 |
CodeInstaller* _code_inst; |
42650 | 66 |
}; |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
67 |
#endif // INCLUDE_AOT |
42650 | 68 |
|
33160 | 69 |
class CodeMetadata { |
70 |
public: |
|
71 |
CodeMetadata() {} |
|
72 |
||
73 |
CodeBlob* get_code_blob() const { return _cb; } |
|
74 |
||
75 |
PcDesc* get_pc_desc() const { return _pc_desc; } |
|
76 |
int get_nr_pc_desc() const { return _nr_pc_desc; } |
|
77 |
||
78 |
u_char* get_scopes_desc() const { return _scopes_desc; } |
|
79 |
int get_scopes_size() const { return _nr_scopes_desc; } |
|
80 |
||
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
81 |
#if INCLUDE_AOT |
33160 | 82 |
RelocBuffer* get_reloc_buffer() { return &_reloc_buffer; } |
42650 | 83 |
AOTOopRecorder* get_oop_recorder() { return _oop_recorder; } |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
84 |
#endif |
42650 | 85 |
|
33160 | 86 |
ExceptionHandlerTable* get_exception_table() { return _exception_table; } |
87 |
||
88 |
void set_pc_desc(PcDesc* desc, int count) { |
|
89 |
_pc_desc = desc; |
|
90 |
_nr_pc_desc = count; |
|
91 |
} |
|
92 |
||
93 |
void set_scopes(u_char* scopes, int size) { |
|
94 |
_scopes_desc = scopes; |
|
95 |
_nr_scopes_desc = size; |
|
96 |
} |
|
97 |
||
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
98 |
#if INCLUDE_AOT |
42650 | 99 |
void set_oop_recorder(AOTOopRecorder* recorder) { |
100 |
_oop_recorder = recorder; |
|
101 |
} |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
102 |
#endif |
42650 | 103 |
|
33160 | 104 |
void set_exception_table(ExceptionHandlerTable* table) { |
105 |
_exception_table = table; |
|
106 |
} |
|
107 |
||
108 |
private: |
|
109 |
CodeBlob* _cb; |
|
110 |
PcDesc* _pc_desc; |
|
111 |
int _nr_pc_desc; |
|
112 |
||
113 |
u_char* _scopes_desc; |
|
114 |
int _nr_scopes_desc; |
|
115 |
||
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
116 |
#if INCLUDE_AOT |
33160 | 117 |
RelocBuffer _reloc_buffer; |
42650 | 118 |
AOTOopRecorder* _oop_recorder; |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
119 |
#endif |
33160 | 120 |
ExceptionHandlerTable* _exception_table; |
121 |
}; |
|
122 |
||
123 |
/* |
|
124 |
* This class handles the conversion from a InstalledCode to a CodeBlob or an nmethod. |
|
125 |
*/ |
|
126 |
class CodeInstaller : public StackObj { |
|
35123
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
34502
diff
changeset
|
127 |
friend class JVMCIVMStructs; |
33160 | 128 |
private: |
129 |
enum MarkId { |
|
42650 | 130 |
VERIFIED_ENTRY = 1, |
131 |
UNVERIFIED_ENTRY = 2, |
|
132 |
OSR_ENTRY = 3, |
|
133 |
EXCEPTION_HANDLER_ENTRY = 4, |
|
134 |
DEOPT_HANDLER_ENTRY = 5, |
|
135 |
INVOKEINTERFACE = 6, |
|
136 |
INVOKEVIRTUAL = 7, |
|
137 |
INVOKESTATIC = 8, |
|
138 |
INVOKESPECIAL = 9, |
|
139 |
INLINE_INVOKE = 10, |
|
140 |
POLL_NEAR = 11, |
|
141 |
POLL_RETURN_NEAR = 12, |
|
142 |
POLL_FAR = 13, |
|
143 |
POLL_RETURN_FAR = 14, |
|
144 |
CARD_TABLE_ADDRESS = 15, |
|
145 |
CARD_TABLE_SHIFT = 16, |
|
146 |
HEAP_TOP_ADDRESS = 17, |
|
147 |
HEAP_END_ADDRESS = 18, |
|
148 |
NARROW_KLASS_BASE_ADDRESS = 19, |
|
43435 | 149 |
NARROW_OOP_BASE_ADDRESS = 20, |
150 |
CRC_TABLE_ADDRESS = 21, |
|
151 |
LOG_OF_HEAP_REGION_GRAIN_BYTES = 22, |
|
152 |
INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED = 23, |
|
42650 | 153 |
INVOKE_INVALID = -1 |
33160 | 154 |
}; |
155 |
||
156 |
Arena _arena; |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
157 |
JVMCIEnv* _jvmci_env; |
33160 | 158 |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
159 |
JVMCIPrimitiveArray _data_section_handle; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
160 |
JVMCIObjectArray _data_section_patches_handle; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
161 |
JVMCIObjectArray _sites_handle; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
162 |
#ifndef PRODUCT |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
163 |
JVMCIObjectArray _comments_handle; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
164 |
#endif |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
165 |
JVMCIPrimitiveArray _code_handle; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
166 |
JVMCIObject _word_kind_handle; |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
167 |
|
33160 | 168 |
CodeOffsets _offsets; |
169 |
||
170 |
jint _code_size; |
|
171 |
jint _total_frame_size; |
|
35823
59a847ec6ee3
8146608: [JVMCI] DebugInfo Tests on DeoptimizeALot runs fails in assert(_pc == *pc_addr || pc == *pc_addr) frame::patch_pc() /frame_x86.cpp:285
rschatz
parents:
35582
diff
changeset
|
172 |
jint _orig_pc_offset; |
33160 | 173 |
jint _parameter_count; |
174 |
jint _constants_size; |
|
175 |
||
176 |
bool _has_wide_vector; |
|
177 |
||
178 |
MarkId _next_call_type; |
|
179 |
address _invoke_mark_pc; |
|
180 |
||
181 |
CodeSection* _instructions; |
|
182 |
CodeSection* _constants; |
|
183 |
||
184 |
OopRecorder* _oop_recorder; |
|
185 |
DebugInformationRecorder* _debug_recorder; |
|
186 |
Dependencies* _dependencies; |
|
187 |
ExceptionHandlerTable _exception_handler_table; |
|
188 |
||
42650 | 189 |
bool _immutable_pic_compilation; // Installer is called for Immutable PIC compilation. |
190 |
||
33160 | 191 |
static ConstantOopWriteValue* _oop_null_scope_value; |
192 |
static ConstantIntValue* _int_m1_scope_value; |
|
193 |
static ConstantIntValue* _int_0_scope_value; |
|
194 |
static ConstantIntValue* _int_1_scope_value; |
|
195 |
static ConstantIntValue* _int_2_scope_value; |
|
196 |
static LocationValue* _illegal_value; |
|
197 |
||
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
198 |
jint pd_next_offset(NativeInstruction* inst, jint pc_offset, JVMCIObject method, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
199 |
void pd_patch_OopConstant(int pc_offset, JVMCIObject constant, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
200 |
void pd_patch_MetaspaceConstant(int pc_offset, JVMCIObject constant, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
201 |
void pd_patch_DataSectionReference(int pc_offset, int data_offset, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
202 |
void pd_relocate_ForeignCall(NativeInstruction* inst, jlong foreign_call_destination, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
203 |
void pd_relocate_JavaMethod(CodeBuffer &cbuf, JVMCIObject method, jint pc_offset, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
204 |
void pd_relocate_poll(address pc, jint mark, JVMCI_TRAPS); |
33160 | 205 |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
206 |
JVMCIObjectArray sites() { return _sites_handle; } |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
207 |
JVMCIPrimitiveArray code() { return _code_handle; } |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
208 |
JVMCIPrimitiveArray data_section() { return _data_section_handle; } |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
209 |
JVMCIObjectArray data_section_patches() { return _data_section_patches_handle; } |
33160 | 210 |
#ifndef PRODUCT |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
211 |
JVMCIObjectArray comments() { return _comments_handle; } |
33160 | 212 |
#endif |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
213 |
JVMCIObject word_kind() { return _word_kind_handle; } |
33160 | 214 |
|
215 |
public: |
|
33632 | 216 |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
217 |
CodeInstaller(JVMCIEnv* jvmci_env, bool immutable_pic_compilation) : _arena(mtJVMCI), _jvmci_env(jvmci_env), _immutable_pic_compilation(immutable_pic_compilation) {} |
33160 | 218 |
|
52381
7f90bc64b0fc
8213203: [JVMCI] adopt formatting changes from jvmci 8
never
parents:
50729
diff
changeset
|
219 |
#if INCLUDE_AOT |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
220 |
JVMCI::CodeInstallResult gather_metadata(JVMCIObject target, JVMCIObject compiled_code, CodeMetadata& metadata, JVMCI_TRAPS); |
52381
7f90bc64b0fc
8213203: [JVMCI] adopt formatting changes from jvmci 8
never
parents:
50729
diff
changeset
|
221 |
#endif |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
222 |
JVMCI::CodeInstallResult install(JVMCICompiler* compiler, |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
223 |
JVMCIObject target, |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
224 |
JVMCIObject compiled_code, |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
225 |
CodeBlob*& cb, |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
226 |
JVMCIObject installed_code, |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
227 |
FailedSpeculation** failed_speculations, |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
228 |
char* speculations, |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
229 |
int speculations_len, |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
230 |
JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
231 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
232 |
JVMCIEnv* jvmci_env() { return _jvmci_env; } |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
233 |
JVMCIRuntime* runtime() { return _jvmci_env->runtime(); } |
33160 | 234 |
|
235 |
static address runtime_call_target_address(oop runtime_call); |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
236 |
static VMReg get_hotspot_reg(jint jvmciRegisterNumber, JVMCI_TRAPS); |
33160 | 237 |
static bool is_general_purpose_reg(VMReg hotspotRegister); |
238 |
||
239 |
const OopMapSet* oopMapSet() const { return _debug_recorder->_oopmaps; } |
|
240 |
||
241 |
protected: |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
242 |
Location::Type get_oop_type(JVMCIObject value); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
243 |
ScopeValue* get_scope_value(JVMCIObject value, BasicType type, GrowableArray<ScopeValue*>* objects, ScopeValue* &second, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
244 |
MonitorValue* get_monitor_value(JVMCIObject value, GrowableArray<ScopeValue*>* objects, JVMCI_TRAPS); |
33160 | 245 |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
246 |
void* record_metadata_reference(CodeSection* section, address dest, JVMCIObject constant, JVMCI_TRAPS); |
33632 | 247 |
#ifdef _LP64 |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
248 |
narrowKlass record_narrow_metadata_reference(CodeSection* section, address dest, JVMCIObject constant, JVMCI_TRAPS); |
33632 | 249 |
#endif |
250 |
||
35582
c32a0cc19877
8147599: [JVMCI] simplify code installation interface
rschatz
parents:
35123
diff
changeset
|
251 |
// extract the fields of the HotSpotCompiledCode |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
252 |
void initialize_fields(JVMCIObject target, JVMCIObject compiled_code, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
253 |
void initialize_dependencies(JVMCIObject compiled_code, OopRecorder* oop_recorder, JVMCI_TRAPS); |
33160 | 254 |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
255 |
int estimate_stubs_size(JVMCI_TRAPS); |
33160 | 256 |
|
257 |
// perform data and call relocation on the CodeBuffer |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
258 |
JVMCI::CodeInstallResult initialize_buffer(CodeBuffer& buffer, bool check_size, JVMCI_TRAPS); |
33160 | 259 |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
260 |
void assumption_NoFinalizableSubclass(JVMCIObject assumption); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
261 |
void assumption_ConcreteSubtype(JVMCIObject assumption); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
262 |
void assumption_LeafType(JVMCIObject assumption); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
263 |
void assumption_ConcreteMethod(JVMCIObject assumption); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
264 |
void assumption_CallSiteTargetValue(JVMCIObject assumption, JVMCI_TRAPS); |
33160 | 265 |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
266 |
void site_Safepoint(CodeBuffer& buffer, jint pc_offset, JVMCIObject site, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
267 |
void site_Infopoint(CodeBuffer& buffer, jint pc_offset, JVMCIObject site, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
268 |
void site_Call(CodeBuffer& buffer, jint pc_offset, JVMCIObject site, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
269 |
void site_DataPatch(CodeBuffer& buffer, jint pc_offset, JVMCIObject site, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
270 |
void site_Mark(CodeBuffer& buffer, jint pc_offset, JVMCIObject site, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
271 |
void site_ExceptionHandler(jint pc_offset, JVMCIObject site); |
33160 | 272 |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
273 |
OopMap* create_oop_map(JVMCIObject debug_info, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
274 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
275 |
VMReg getVMRegFromLocation(JVMCIObject location, int total_frame_size, JVMCI_TRAPS); |
33160 | 276 |
|
34502
1cfcb971cb17
8143730: [JVMCI] infopoint recording is too restrictive
dnsimon
parents:
34165
diff
changeset
|
277 |
/** |
1cfcb971cb17
8143730: [JVMCI] infopoint recording is too restrictive
dnsimon
parents:
34165
diff
changeset
|
278 |
* Specifies the level of detail to record for a scope. |
1cfcb971cb17
8143730: [JVMCI] infopoint recording is too restrictive
dnsimon
parents:
34165
diff
changeset
|
279 |
*/ |
1cfcb971cb17
8143730: [JVMCI] infopoint recording is too restrictive
dnsimon
parents:
34165
diff
changeset
|
280 |
enum ScopeMode { |
1cfcb971cb17
8143730: [JVMCI] infopoint recording is too restrictive
dnsimon
parents:
34165
diff
changeset
|
281 |
// Only record a method and BCI |
1cfcb971cb17
8143730: [JVMCI] infopoint recording is too restrictive
dnsimon
parents:
34165
diff
changeset
|
282 |
BytecodePosition, |
1cfcb971cb17
8143730: [JVMCI] infopoint recording is too restrictive
dnsimon
parents:
34165
diff
changeset
|
283 |
// Record a method, bci and JVM frame state |
1cfcb971cb17
8143730: [JVMCI] infopoint recording is too restrictive
dnsimon
parents:
34165
diff
changeset
|
284 |
FullFrame |
1cfcb971cb17
8143730: [JVMCI] infopoint recording is too restrictive
dnsimon
parents:
34165
diff
changeset
|
285 |
}; |
1cfcb971cb17
8143730: [JVMCI] infopoint recording is too restrictive
dnsimon
parents:
34165
diff
changeset
|
286 |
|
50729
7755c93d3923
8204209: [Graal] Compilation fails during nmethod printing with "assert(bci == 0 || 0 <= bci && bci < code_size()) failed: illegal bci"
iveresov
parents:
49192
diff
changeset
|
287 |
int map_jvmci_bci(int bci); |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
288 |
|
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
289 |
void record_scope(jint pc_offset, JVMCIObject debug_info, ScopeMode scope_mode, bool return_oop, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
290 |
void record_scope(jint pc_offset, JVMCIObject debug_info, ScopeMode scope_mode, JVMCI_TRAPS) { |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
291 |
record_scope(pc_offset, debug_info, scope_mode, false /* return_oop */, JVMCIENV); |
42861
1d4dfdf4390b
8169938: [AOT] SIGSEGV at ~BufferBlob::vtable chunks
dlong
parents:
42650
diff
changeset
|
292 |
} |
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
293 |
void record_scope(jint pc_offset, JVMCIObject position, ScopeMode scope_mode, GrowableArray<ScopeValue*>* objects, bool return_oop, JVMCI_TRAPS); |
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
294 |
void record_object_value(ObjectValue* sv, JVMCIObject value, GrowableArray<ScopeValue*>* objects, JVMCI_TRAPS); |
33160 | 295 |
|
54669
ad45b3802d4e
8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
kvn
parents:
53244
diff
changeset
|
296 |
GrowableArray<ScopeValue*>* record_virtual_objects(JVMCIObject debug_info, JVMCI_TRAPS); |
33160 | 297 |
|
298 |
int estimateStubSpace(int static_call_stubs); |
|
299 |
}; |
|
300 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
52381
diff
changeset
|
301 |
#endif // SHARE_JVMCI_JVMCICODEINSTALLER_HPP |