Mercurial > hg > graal-jvmci-8
annotate src/share/vm/jvmci/jvmciCodeInstaller.hpp @ 23760:655fd63024d0
move jvmci flag handling to JVMCIGlobals
author | David Leopoldseder <david.d.leopoldseder@oracle.com> |
---|---|
date | Fri, 23 Sep 2016 16:33:12 +0200 |
parents | 83b296a07c33 |
children | edf3f2eb3b00 |
rev | line source |
---|---|
2516
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
1 /* |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22739
diff
changeset
|
2 * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
2516
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
4 * |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
7 * published by the Free Software Foundation. |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
8 * |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
13 * accompanied this code). |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
14 * |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
18 * |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
a384fac3fd34
Removed anything OSR-related.
Thomas Wuerthinger <thomas@wuerthinger.net>
parents:
2502
diff
changeset
|
21 * questions. |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
22 */ |
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
23 |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
20829
diff
changeset
|
24 #ifndef SHARE_VM_JVMCI_JVMCI_CODE_INSTALLER_HPP |
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
20829
diff
changeset
|
25 #define SHARE_VM_JVMCI_JVMCI_CODE_INSTALLER_HPP |
5747
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
5554
diff
changeset
|
26 |
22650
939d5da65929
reduced delta against jvmci-9
Doug Simon <doug.simon@oracle.com>
parents:
22590
diff
changeset
|
27 #include "jvmci/jvmciCompiler.hpp" |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
20829
diff
changeset
|
28 #include "jvmci/jvmciEnv.hpp" |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
29 |
1434
72cfb36c6bb2
* enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1433
diff
changeset
|
30 /* |
5554
70f715dfbb41
Bring Java renamings and restructurings to the C++ part.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
5275
diff
changeset
|
31 * This class handles the conversion from a InstalledCode to a CodeBlob or an nmethod. |
1434
72cfb36c6bb2
* enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1433
diff
changeset
|
32 */ |
17335
508e88b5f1d3
Don't hang onto code install references after install finished
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17241
diff
changeset
|
33 class CodeInstaller : public StackObj { |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
34 friend class VMStructs; |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
35 private: |
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
36 enum MarkId { |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
37 VERIFIED_ENTRY = 1, |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
38 UNVERIFIED_ENTRY = 2, |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
39 OSR_ENTRY = 3, |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
40 EXCEPTION_HANDLER_ENTRY = 4, |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
41 DEOPT_HANDLER_ENTRY = 5, |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
42 INVOKEINTERFACE = 6, |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
43 INVOKEVIRTUAL = 7, |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
44 INVOKESTATIC = 8, |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
45 INVOKESPECIAL = 9, |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
46 INLINE_INVOKE = 10, |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
47 POLL_NEAR = 11, |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
48 POLL_RETURN_NEAR = 12, |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
49 POLL_FAR = 13, |
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
50 POLL_RETURN_FAR = 14, |
18661 | 51 CARD_TABLE_ADDRESS = 15, |
52 CARD_TABLE_SHIFT = 16, | |
14574
6bab029d6e3a
removed com/oracle/graal/hotspot/bridge/Marks.java and replaced with enum
twisti
parents:
14561
diff
changeset
|
53 INVOKE_INVALID = -1 |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
54 }; |
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
55 |
7094
eec7173947a1
removed remaining use of the C++ "compiler interface" (i.e. ci) by Graal for installing dependencies
Doug Simon <doug.simon@oracle.com>
parents:
7089
diff
changeset
|
56 Arena _arena; |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
57 |
17241
6fcb6691fe5f
Add safepoint checks during code installation
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17024
diff
changeset
|
58 jobject _data_section_handle; |
18176
c2270ad35f57
Better construction of data section and data patches.
Roland Schatz <roland.schatz@oracle.com>
parents:
18173
diff
changeset
|
59 jobject _data_section_patches_handle; |
17241
6fcb6691fe5f
Add safepoint checks during code installation
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17024
diff
changeset
|
60 jobject _sites_handle; |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
61 CodeOffsets _offsets; |
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
62 |
17241
6fcb6691fe5f
Add safepoint checks during code installation
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17024
diff
changeset
|
63 jobject _code_handle; |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
64 jint _code_size; |
4174
79c91d220d73
Use callee save area to model the saved rbp register. Remove various hacks that added the saved area size in native code.
Christian Wimmer <Christian.Wimmer@Oracle.com>
parents:
3703
diff
changeset
|
65 jint _total_frame_size; |
23299
805d58f2cd8c
Use explicit StackSlot instead of int offset for the deopt rescue slot.
Roland Schatz <roland.schatz@oracle.com>
parents:
22773
diff
changeset
|
66 jint _orig_pc_offset; |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
67 jint _parameter_count; |
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
68 jint _constants_size; |
9807
d552919fbb05
Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents:
9669
diff
changeset
|
69 #ifndef PRODUCT |
17241
6fcb6691fe5f
Add safepoint checks during code installation
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17024
diff
changeset
|
70 jobject _comments_handle; |
9807
d552919fbb05
Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents:
9669
diff
changeset
|
71 #endif |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
72 |
21731
df9d2375512a
Track max live register value in reference map
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
21730
diff
changeset
|
73 bool _has_wide_vector; |
22535
ca418f35d728
Use wordKind instead of Kind.Object in backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
22496
diff
changeset
|
74 jobject _word_kind_handle; |
21731
df9d2375512a
Track max live register value in reference map
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
21730
diff
changeset
|
75 |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
76 MarkId _next_call_type; |
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
77 address _invoke_mark_pc; |
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
78 |
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
79 CodeSection* _instructions; |
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
80 CodeSection* _constants; |
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
81 |
1429
abc670a709dc
* -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1428
diff
changeset
|
82 OopRecorder* _oop_recorder; |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
83 DebugInformationRecorder* _debug_recorder; |
1429
abc670a709dc
* -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1428
diff
changeset
|
84 Dependencies* _dependencies; |
abc670a709dc
* -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents:
1428
diff
changeset
|
85 ExceptionHandlerTable _exception_handler_table; |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
86 |
18173
8c079b8d0446
Reduce allocation during scope recording
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17335
diff
changeset
|
87 static ConstantOopWriteValue* _oop_null_scope_value; |
8c079b8d0446
Reduce allocation during scope recording
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17335
diff
changeset
|
88 static ConstantIntValue* _int_m1_scope_value; |
8c079b8d0446
Reduce allocation during scope recording
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17335
diff
changeset
|
89 static ConstantIntValue* _int_0_scope_value; |
8c079b8d0446
Reduce allocation during scope recording
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17335
diff
changeset
|
90 static ConstantIntValue* _int_1_scope_value; |
8c079b8d0446
Reduce allocation during scope recording
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17335
diff
changeset
|
91 static ConstantIntValue* _int_2_scope_value; |
8c079b8d0446
Reduce allocation during scope recording
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17335
diff
changeset
|
92 static LocationValue* _illegal_value; |
8c079b8d0446
Reduce allocation during scope recording
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17335
diff
changeset
|
93 |
22711
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
94 jint pd_next_offset(NativeInstruction* inst, jint pc_offset, Handle method, TRAPS); |
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
95 void pd_patch_OopConstant(int pc_offset, Handle constant, TRAPS); |
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
96 void pd_patch_MetaspaceConstant(int pc_offset, Handle constant, TRAPS); |
23310
e5b5170606a2
8149689: [JVMCI] CodeInstaller::pd_patch_DataSectionReference should be able to throw exceptions
twisti
parents:
23299
diff
changeset
|
97 void pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS); |
22711
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
98 void pd_relocate_ForeignCall(NativeInstruction* inst, jlong foreign_call_destination, TRAPS); |
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
99 void pd_relocate_JavaMethod(Handle method, jint pc_offset, TRAPS); |
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
100 void pd_relocate_poll(address pc, jint mark, TRAPS); |
9934
0f7ca53be929
CR-806: Changes to build Graal for SPARC
Morris Meyer <morris.meyer@oracle.com>
parents:
9807
diff
changeset
|
101 |
17241
6fcb6691fe5f
Add safepoint checks during code installation
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17024
diff
changeset
|
102 objArrayOop sites() { return (objArrayOop) JNIHandles::resolve(_sites_handle); } |
6fcb6691fe5f
Add safepoint checks during code installation
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17024
diff
changeset
|
103 arrayOop code() { return (arrayOop) JNIHandles::resolve(_code_handle); } |
6fcb6691fe5f
Add safepoint checks during code installation
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17024
diff
changeset
|
104 arrayOop data_section() { return (arrayOop) JNIHandles::resolve(_data_section_handle); } |
18176
c2270ad35f57
Better construction of data section and data patches.
Roland Schatz <roland.schatz@oracle.com>
parents:
18173
diff
changeset
|
105 objArrayOop data_section_patches() { return (objArrayOop) JNIHandles::resolve(_data_section_patches_handle); } |
17241
6fcb6691fe5f
Add safepoint checks during code installation
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17024
diff
changeset
|
106 #ifndef PRODUCT |
6fcb6691fe5f
Add safepoint checks during code installation
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17024
diff
changeset
|
107 objArrayOop comments() { return (objArrayOop) JNIHandles::resolve(_comments_handle); } |
6fcb6691fe5f
Add safepoint checks during code installation
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
17024
diff
changeset
|
108 #endif |
17024
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16573
diff
changeset
|
109 |
22535
ca418f35d728
Use wordKind instead of Kind.Object in backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
22496
diff
changeset
|
110 oop word_kind() { return (oop) JNIHandles::resolve(_word_kind_handle); } |
ca418f35d728
Use wordKind instead of Kind.Object in backend.
Roland Schatz <roland.schatz@oracle.com>
parents:
22496
diff
changeset
|
111 |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
112 public: |
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
113 |
20829
0d578aeb2b5e
[SOLARIS] Call constructor of Arena implicitely; on SolarisStudio the destructor behavior is different
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
20807
diff
changeset
|
114 CodeInstaller() : _arena(mtCompiler) {} |
22728
eb2091fcd682
Pass Handle per value.
Roland Schatz <roland.schatz@oracle.com>
parents:
22722
diff
changeset
|
115 JVMCIEnv::CodeInstallResult install(JVMCICompiler* compiler, Handle target, Handle compiled_code, CodeBlob*& cb, Handle installed_code, Handle speculation_log, TRAPS); |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
116 |
3572
076a2c9caf71
Factor out runtime call target address determination to avoid redundancy between CodeInstaller::site_Call() and VMEntries.getMaxCallTargetOffset()
Peter Hofer <peter.hofer@jku.at>
parents:
3550
diff
changeset
|
117 static address runtime_call_target_address(oop runtime_call); |
22711
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
118 static VMReg get_hotspot_reg(jint jvmciRegisterNumber, TRAPS); |
17024
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16573
diff
changeset
|
119 static bool is_general_purpose_reg(VMReg hotspotRegister); |
3572
076a2c9caf71
Factor out runtime call target address determination to avoid redundancy between CodeInstaller::site_Call() and VMEntries.getMaxCallTargetOffset()
Peter Hofer <peter.hofer@jku.at>
parents:
3550
diff
changeset
|
120 |
20044
c1f116cd4b67
Speed up debug info generation for virtual objects
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19801
diff
changeset
|
121 private: |
22711
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
122 Location::Type get_oop_type(Handle value); |
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
123 ScopeValue* get_scope_value(Handle value, BasicType type, GrowableArray<ScopeValue*>* objects, ScopeValue* &second, TRAPS); |
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
124 MonitorValue* get_monitor_value(Handle value, GrowableArray<ScopeValue*>* objects, TRAPS); |
13493
03bb0ee05409
made CodeInstaller subclassable and virtualized the methods for creating ScopeValues
Doug Simon <doug.simon@oracle.com>
parents:
11760
diff
changeset
|
125 |
23330
83b296a07c33
Fix wrong pointer cast.
Roland Schatz <roland.schatz@oracle.com>
parents:
23322
diff
changeset
|
126 void* record_metadata_reference(Handle constant, TRAPS); |
22590
3f6488b29c1a
Remove rawValue from HotSpotMetaspaceConstantImpl, patch raw pointer at code installation time.
Roland Schatz <roland.schatz@oracle.com>
parents:
22538
diff
changeset
|
127 #ifdef _LP64 |
22711
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
128 narrowKlass record_narrow_metadata_reference(Handle constant, TRAPS); |
22590
3f6488b29c1a
Remove rawValue from HotSpotMetaspaceConstantImpl, patch raw pointer at code installation time.
Roland Schatz <roland.schatz@oracle.com>
parents:
22538
diff
changeset
|
129 #endif |
3f6488b29c1a
Remove rawValue from HotSpotMetaspaceConstantImpl, patch raw pointer at code installation time.
Roland Schatz <roland.schatz@oracle.com>
parents:
22538
diff
changeset
|
130 |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22739
diff
changeset
|
131 // extract the fields of the HotSpotCompiledCode |
22711
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
132 void initialize_fields(oop target, oop target_method, TRAPS); |
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
133 void initialize_dependencies(oop target_method, TRAPS); |
15046
5c71dcf0915d
use hotspot static stubs for call sites
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14574
diff
changeset
|
134 |
22711
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
135 int estimate_stubs_size(TRAPS); |
15046
5c71dcf0915d
use hotspot static stubs for call sites
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14574
diff
changeset
|
136 |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
137 // perform data and call relocation on the CodeBuffer |
22711
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
138 JVMCIEnv::CodeInstallResult initialize_buffer(CodeBuffer& buffer, TRAPS); |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
139 |
9012
2979aaac95af
assumptions: enable NoFinalizableSubclass assumption
Bernhard Urban <bernhard.urban@jku.at>
parents:
8947
diff
changeset
|
140 void assumption_NoFinalizableSubclass(Handle assumption); |
3672
5e331d5f760e
removed transition to vm in ci interface
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3670
diff
changeset
|
141 void assumption_ConcreteSubtype(Handle assumption); |
19801
deab43a789ad
Split LeafType off from ConcreteSubtype
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19306
diff
changeset
|
142 void assumption_LeafType(Handle assumption); |
3672
5e331d5f760e
removed transition to vm in ci interface
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3670
diff
changeset
|
143 void assumption_ConcreteMethod(Handle assumption); |
8947
707b20dd9512
draft call site target value assumption
Andreas Woess <andreas.woess@jku.at>
parents:
8368
diff
changeset
|
144 void assumption_CallSiteTargetValue(Handle assumption); |
2048
177398c6147d
Added unique concrete subtype assumption.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents:
1938
diff
changeset
|
145 |
22711
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
146 void site_Safepoint(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS); |
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
147 void site_Infopoint(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS); |
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
148 void site_Call(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS); |
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
149 void site_DataPatch(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS); |
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
150 void site_Mark(CodeBuffer& buffer, jint pc_offset, Handle site, TRAPS); |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22739
diff
changeset
|
151 void site_ExceptionHandler(jint pc_offset, Handle site); |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
152 |
22711
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
153 OopMap* create_oop_map(Handle debug_info, TRAPS); |
21730
b9f9b8af17ff
Simplify interface to reference map
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
21559
diff
changeset
|
154 |
22739
f41ed1d87d68
8143730 [JVMCI] infopoint recording is too restrictive
Doug Simon <doug.simon@oracle.com>
parents:
22728
diff
changeset
|
155 /** |
f41ed1d87d68
8143730 [JVMCI] infopoint recording is too restrictive
Doug Simon <doug.simon@oracle.com>
parents:
22728
diff
changeset
|
156 * Specifies the level of detail to record for a scope. |
f41ed1d87d68
8143730 [JVMCI] infopoint recording is too restrictive
Doug Simon <doug.simon@oracle.com>
parents:
22728
diff
changeset
|
157 */ |
f41ed1d87d68
8143730 [JVMCI] infopoint recording is too restrictive
Doug Simon <doug.simon@oracle.com>
parents:
22728
diff
changeset
|
158 enum ScopeMode { |
f41ed1d87d68
8143730 [JVMCI] infopoint recording is too restrictive
Doug Simon <doug.simon@oracle.com>
parents:
22728
diff
changeset
|
159 // Only record a method and BCI |
f41ed1d87d68
8143730 [JVMCI] infopoint recording is too restrictive
Doug Simon <doug.simon@oracle.com>
parents:
22728
diff
changeset
|
160 BytecodePosition, |
f41ed1d87d68
8143730 [JVMCI] infopoint recording is too restrictive
Doug Simon <doug.simon@oracle.com>
parents:
22728
diff
changeset
|
161 // Record a method, bci and JVM frame state |
f41ed1d87d68
8143730 [JVMCI] infopoint recording is too restrictive
Doug Simon <doug.simon@oracle.com>
parents:
22728
diff
changeset
|
162 FullFrame |
f41ed1d87d68
8143730 [JVMCI] infopoint recording is too restrictive
Doug Simon <doug.simon@oracle.com>
parents:
22728
diff
changeset
|
163 }; |
f41ed1d87d68
8143730 [JVMCI] infopoint recording is too restrictive
Doug Simon <doug.simon@oracle.com>
parents:
22728
diff
changeset
|
164 |
f41ed1d87d68
8143730 [JVMCI] infopoint recording is too restrictive
Doug Simon <doug.simon@oracle.com>
parents:
22728
diff
changeset
|
165 void record_scope(jint pc_offset, Handle debug_info, ScopeMode scope_mode, TRAPS); |
f41ed1d87d68
8143730 [JVMCI] infopoint recording is too restrictive
Doug Simon <doug.simon@oracle.com>
parents:
22728
diff
changeset
|
166 void record_scope(jint pc_offset, Handle position, ScopeMode scope_mode, GrowableArray<ScopeValue*>* objects, TRAPS); |
22711
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
167 void record_object_value(ObjectValue* sv, Handle value, GrowableArray<ScopeValue*>* objects, TRAPS); |
20044
c1f116cd4b67
Speed up debug info generation for virtual objects
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19801
diff
changeset
|
168 |
22711
316e768645c0
8139589: [JVMCI] throw exceptions in faulty code installation operations
Roland Schatz <roland.schatz@oracle.com>
parents:
22684
diff
changeset
|
169 GrowableArray<ScopeValue*>* record_virtual_objects(Handle debug_info, TRAPS); |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
170 |
15046
5c71dcf0915d
use hotspot static stubs for call sites
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
14574
diff
changeset
|
171 int estimateStubSpace(int static_call_stubs); |
1428
695451afc619
refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff
changeset
|
172 }; |
3703
50a1d38cd7ac
Add newlines at the end of files, otherwise my version of gcc complains
Christian Wimmer <christian.wimmer@oracle.com>
parents:
3672
diff
changeset
|
173 |
14104 | 174 /** |
18222
a8cff27ca2e1
converted HotSpotResolvedJavaMethod to an interface
Doug Simon <doug.simon@oracle.com>
parents:
18176
diff
changeset
|
175 * Gets the Method metaspace object from a HotSpotResolvedJavaMethodImpl Java object. |
14104 | 176 */ |
177 Method* getMethodFromHotSpotMethod(oop hotspot_method); | |
178 | |
17024
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16573
diff
changeset
|
179 |
4e2d34d7715b
[SPARC/AMD64] Splitting up oopmap generation for Intel XMM and SPARC Floatingpoint registers
Stefan Anzinger <stefan.anzinger@oracle.com>
parents:
16573
diff
changeset
|
180 |
21559
be896a1983c0
recast all Graal native code as JVMCI code (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
20829
diff
changeset
|
181 #endif // SHARE_VM_JVMCI_JVMCI_CODE_INSTALLER_HPP |