Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java @ 23785:5cf445d2acf6 jvmci-0.22
Exported elements referring to inaccessible types in jdk.vm.ci (JDK-8167180)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 11 Oct 2016 22:13:23 +0200 |
parents | 9e1235406b59 |
children |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
2 * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * questions. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 */ |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22625
diff
changeset
|
23 package jdk.vm.ci.hotspot; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 |
22780
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
25 import jdk.vm.ci.code.BytecodeFrame; |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
26 import jdk.vm.ci.code.CompiledCode; |
23299
805d58f2cd8c
Use explicit StackSlot instead of int offset for the deopt rescue slot.
Roland Schatz <roland.schatz@oracle.com>
parents:
22781
diff
changeset
|
27 import jdk.vm.ci.code.StackSlot; |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
28 import jdk.vm.ci.code.site.DataPatch; |
22780
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
29 import jdk.vm.ci.code.site.Infopoint; |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
30 import jdk.vm.ci.code.site.Site; |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22625
diff
changeset
|
31 import jdk.vm.ci.meta.Assumptions.Assumption; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22625
diff
changeset
|
32 import jdk.vm.ci.meta.ResolvedJavaMethod; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
33 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
34 /** |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
35 * A {@link CompiledCode} with additional HotSpot-specific information required for installing the |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
36 * code in HotSpot's code cache. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
37 */ |
22780
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
38 public class HotSpotCompiledCode implements CompiledCode { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
39 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
40 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
41 * The name of this compilation unit. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
42 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
43 protected final String name; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
44 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
45 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
46 * The buffer containing the emitted machine code. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
47 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
48 protected final byte[] targetCode; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
49 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
50 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
51 * The leading number of bytes in {@link #targetCode} containing the emitted machine code. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
52 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
53 protected final int targetCodeSize; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
54 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
55 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
56 * A list of code annotations describing special sites in {@link #targetCode}. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
57 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
58 protected final Site[] sites; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
59 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
60 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
61 * A list of {@link Assumption} this code relies on. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
62 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
63 protected final Assumption[] assumptions; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
64 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
65 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
66 * The list of the methods whose bytecodes were used as input to the compilation. If |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
67 * {@code null}, then the compilation did not record method dependencies. Otherwise, the first |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
68 * element of this array is the root method of the compilation. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
69 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
70 protected final ResolvedJavaMethod[] methods; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
71 |
22781
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
72 /** |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
73 * A list of comments that will be included in code dumps. |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
74 */ |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
75 protected final Comment[] comments; |
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
|
76 |
22781
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
77 /** |
23398
3e8ce13f4e12
minimize diff to jvmci-9
Doug Simon <doug.simon@oracle.com>
parents:
23299
diff
changeset
|
78 * The data section containing serialized constants for the emitted machine code. |
22781
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
79 */ |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
80 protected final byte[] dataSection; |
22781
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
81 |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
82 /** |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
83 * The minimum alignment of the data section. |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
84 */ |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
85 protected final int dataSectionAlignment; |
22781
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
86 |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
87 /** |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
88 * A list of relocations in the {@link #dataSection}. |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
89 */ |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
90 protected final DataPatch[] dataSectionPatches; |
21506
5cbaf1e9ff2e
Remove reference to CompilationResult from HotSpotCompiledCode.
Roland Schatz <roland.schatz@oracle.com>
parents:
21411
diff
changeset
|
91 |
22781
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
92 /** |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
93 * A flag determining whether this code is immutable and position independent. |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
94 */ |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
95 protected final boolean isImmutablePIC; |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
96 |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
97 /** |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
98 * The total size of the stack frame of this compiled method. |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
99 */ |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
100 protected final int totalFrameSize; |
22781
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
101 |
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
102 /** |
23299
805d58f2cd8c
Use explicit StackSlot instead of int offset for the deopt rescue slot.
Roland Schatz <roland.schatz@oracle.com>
parents:
22781
diff
changeset
|
103 * The deopt rescue slot. Must be non-null if there is a safepoint in the method. |
22781
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
104 */ |
23299
805d58f2cd8c
Use explicit StackSlot instead of int offset for the deopt rescue slot.
Roland Schatz <roland.schatz@oracle.com>
parents:
22781
diff
changeset
|
105 protected final StackSlot deoptRescueSlot; |
21506
5cbaf1e9ff2e
Remove reference to CompilationResult from HotSpotCompiledCode.
Roland Schatz <roland.schatz@oracle.com>
parents:
21411
diff
changeset
|
106 |
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
|
107 public static class Comment { |
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
|
108 |
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
|
109 public final String text; |
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
|
110 public final int pcOffset; |
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
|
111 |
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
|
112 public Comment(int pcOffset, String text) { |
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
|
113 this.text = text; |
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
|
114 this.pcOffset = pcOffset; |
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
|
115 } |
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
|
116 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
117 |
23700
9e1235406b59
[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
Doug Simon <doug.simon@oracle.com>
parents:
23398
diff
changeset
|
118 @SuppressFBWarnings(value = "EI_EXPOSE_REP2", justification = "caller transfers ownership of `sites`, `targetCode`, `comments`, `methods`, `dataSection`, `dataSectionPatches` and `assumptions`") |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
119 public HotSpotCompiledCode(String name, byte[] targetCode, int targetCodeSize, Site[] sites, Assumption[] assumptions, ResolvedJavaMethod[] methods, Comment[] comments, byte[] dataSection, |
23299
805d58f2cd8c
Use explicit StackSlot instead of int offset for the deopt rescue slot.
Roland Schatz <roland.schatz@oracle.com>
parents:
22781
diff
changeset
|
120 int dataSectionAlignment, DataPatch[] dataSectionPatches, boolean isImmutablePIC, int totalFrameSize, StackSlot deoptRescueSlot) { |
22780
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
121 this.name = name; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
122 this.targetCode = targetCode; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
123 this.targetCodeSize = targetCodeSize; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
124 this.sites = sites; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
125 this.assumptions = assumptions; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
126 this.methods = methods; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
127 |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
128 this.comments = comments; |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
129 this.dataSection = dataSection; |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
130 this.dataSectionAlignment = dataSectionAlignment; |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
131 this.dataSectionPatches = dataSectionPatches; |
22781
5d06abd6d35b
Backport isImmutablePIC field from jvmci-9, and add documentation.
Roland Schatz <roland.schatz@oracle.com>
parents:
22780
diff
changeset
|
132 this.isImmutablePIC = isImmutablePIC; |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
133 this.totalFrameSize = totalFrameSize; |
23299
805d58f2cd8c
Use explicit StackSlot instead of int offset for the deopt rescue slot.
Roland Schatz <roland.schatz@oracle.com>
parents:
22781
diff
changeset
|
134 this.deoptRescueSlot = deoptRescueSlot; |
22780
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
135 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
136 assert validateFrames(); |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
137 } |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
138 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
139 public String getName() { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
140 return name; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
141 } |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
142 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
143 @Override |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
144 public String toString() { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
145 return name; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
146 } |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
147 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
148 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
149 * Ensure that all the frames passed into the VM are properly formatted with an empty or illegal |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
150 * slot following double word slots. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
151 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
152 private boolean validateFrames() { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
153 for (Site site : sites) { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
154 if (site instanceof Infopoint) { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
155 Infopoint info = (Infopoint) site; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
156 if (info.debugInfo != null) { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
157 BytecodeFrame frame = info.debugInfo.frame(); |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
158 assert frame == null || frame.validateFormat(); |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
159 } |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
160 } |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
161 } |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
162 return true; |
22625
545590b1ab83
expanded CodeCacheProvider so that it supports all forms of code installation and made CompilerToVM.installCode package-private
Doug Simon <doug.simon@oracle.com>
parents:
22569
diff
changeset
|
163 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
164 } |