annotate agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java @ 24234:ea6f94ab283b default tip

Added tag jvmci-0.36 for changeset 8128b98d4736
author Gilles Duboscq <gilles.m.duboscq@oracle.com>
date Mon, 18 Sep 2017 18:49:45 +0200
parents f9d003ea9023
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
22841
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
2 * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 844
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 844
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 844
diff changeset
21 * questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 package sun.jvm.hotspot.memory;
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 import java.io.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
28 import java.util.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
29 import sun.jvm.hotspot.debugger.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
30 import sun.jvm.hotspot.gc_interface.*;
3972
4f93f0d00802 7059019: G1: add G1 support to the SA
tonyp
parents: 1552
diff changeset
31 import sun.jvm.hotspot.gc_implementation.g1.G1CollectedHeap;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
32 import sun.jvm.hotspot.gc_implementation.parallelScavenge.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
33 import sun.jvm.hotspot.oops.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
34 import sun.jvm.hotspot.types.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
35 import sun.jvm.hotspot.runtime.*;
a61af66fc99e Initial load
duke
parents:
diff changeset
36
a61af66fc99e Initial load
duke
parents:
diff changeset
37
a61af66fc99e Initial load
duke
parents:
diff changeset
38 public class Universe {
a61af66fc99e Initial load
duke
parents:
diff changeset
39 private static AddressField collectedHeapField;
a61af66fc99e Initial load
duke
parents:
diff changeset
40 private static VirtualConstructor heapConstructor;
a61af66fc99e Initial load
duke
parents:
diff changeset
41 private static sun.jvm.hotspot.types.OopField mainThreadGroupField;
a61af66fc99e Initial load
duke
parents:
diff changeset
42 private static sun.jvm.hotspot.types.OopField systemThreadGroupField;
a61af66fc99e Initial load
duke
parents:
diff changeset
43
a61af66fc99e Initial load
duke
parents:
diff changeset
44 // single dimensional primitive array klasses
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
45 private static sun.jvm.hotspot.types.AddressField boolArrayKlassField;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
46 private static sun.jvm.hotspot.types.AddressField byteArrayKlassField;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
47 private static sun.jvm.hotspot.types.AddressField charArrayKlassField;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
48 private static sun.jvm.hotspot.types.AddressField intArrayKlassField;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
49 private static sun.jvm.hotspot.types.AddressField shortArrayKlassField;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
50 private static sun.jvm.hotspot.types.AddressField longArrayKlassField;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
51 private static sun.jvm.hotspot.types.AddressField singleArrayKlassField;
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
52 private static sun.jvm.hotspot.types.AddressField doubleArrayKlassField;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
53
642
660978a2a31a 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 196
diff changeset
54 private static AddressField narrowOopBaseField;
660978a2a31a 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 196
diff changeset
55 private static CIntegerField narrowOopShiftField;
6848
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
56 private static AddressField narrowKlassBaseField;
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
57 private static CIntegerField narrowKlassShiftField;
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
58
22841
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
59 public enum NARROW_OOP_MODE {
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
60 UnscaledNarrowOop,
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
61 ZeroBasedNarrowOop,
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
62 HeapBasedNarrowOop
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
63 }
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
64
0
a61af66fc99e Initial load
duke
parents:
diff changeset
65 static {
a61af66fc99e Initial load
duke
parents:
diff changeset
66 VM.registerVMInitializedObserver(new Observer() {
a61af66fc99e Initial load
duke
parents:
diff changeset
67 public void update(Observable o, Object data) {
a61af66fc99e Initial load
duke
parents:
diff changeset
68 initialize(VM.getVM().getTypeDataBase());
a61af66fc99e Initial load
duke
parents:
diff changeset
69 }
a61af66fc99e Initial load
duke
parents:
diff changeset
70 });
a61af66fc99e Initial load
duke
parents:
diff changeset
71 }
a61af66fc99e Initial load
duke
parents:
diff changeset
72
a61af66fc99e Initial load
duke
parents:
diff changeset
73 private static synchronized void initialize(TypeDataBase db) {
a61af66fc99e Initial load
duke
parents:
diff changeset
74 Type type = db.lookupType("Universe");
a61af66fc99e Initial load
duke
parents:
diff changeset
75
a61af66fc99e Initial load
duke
parents:
diff changeset
76 collectedHeapField = type.getAddressField("_collectedHeap");
a61af66fc99e Initial load
duke
parents:
diff changeset
77
a61af66fc99e Initial load
duke
parents:
diff changeset
78 heapConstructor = new VirtualConstructor(db);
a61af66fc99e Initial load
duke
parents:
diff changeset
79 heapConstructor.addMapping("GenCollectedHeap", GenCollectedHeap.class);
a61af66fc99e Initial load
duke
parents:
diff changeset
80 heapConstructor.addMapping("ParallelScavengeHeap", ParallelScavengeHeap.class);
3972
4f93f0d00802 7059019: G1: add G1 support to the SA
tonyp
parents: 1552
diff changeset
81 heapConstructor.addMapping("G1CollectedHeap", G1CollectedHeap.class);
0
a61af66fc99e Initial load
duke
parents:
diff changeset
82
a61af66fc99e Initial load
duke
parents:
diff changeset
83 mainThreadGroupField = type.getOopField("_main_thread_group");
a61af66fc99e Initial load
duke
parents:
diff changeset
84 systemThreadGroupField = type.getOopField("_system_thread_group");
a61af66fc99e Initial load
duke
parents:
diff changeset
85
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
86 boolArrayKlassField = type.getAddressField("_boolArrayKlassObj");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
87 byteArrayKlassField = type.getAddressField("_byteArrayKlassObj");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
88 charArrayKlassField = type.getAddressField("_charArrayKlassObj");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
89 intArrayKlassField = type.getAddressField("_intArrayKlassObj");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
90 shortArrayKlassField = type.getAddressField("_shortArrayKlassObj");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
91 longArrayKlassField = type.getAddressField("_longArrayKlassObj");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
92 singleArrayKlassField = type.getAddressField("_singleArrayKlassObj");
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
93 doubleArrayKlassField = type.getAddressField("_doubleArrayKlassObj");
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
94
642
660978a2a31a 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 196
diff changeset
95 narrowOopBaseField = type.getAddressField("_narrow_oop._base");
660978a2a31a 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 196
diff changeset
96 narrowOopShiftField = type.getCIntegerField("_narrow_oop._shift");
6848
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
97 narrowKlassBaseField = type.getAddressField("_narrow_klass._base");
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
98 narrowKlassShiftField = type.getCIntegerField("_narrow_klass._shift");
0
a61af66fc99e Initial load
duke
parents:
diff changeset
99 }
a61af66fc99e Initial load
duke
parents:
diff changeset
100
a61af66fc99e Initial load
duke
parents:
diff changeset
101 public Universe() {
a61af66fc99e Initial load
duke
parents:
diff changeset
102 }
22841
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
103 public static String narrowOopModeToString(NARROW_OOP_MODE mode) {
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
104 switch (mode) {
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
105 case UnscaledNarrowOop:
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
106 return "32-bits Oops";
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
107 case ZeroBasedNarrowOop:
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
108 return "zero based Compressed Oops";
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
109 case HeapBasedNarrowOop:
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
110 return "Compressed Oops with base";
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
111 }
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
112 return "";
f9d003ea9023 8046282: SA update
poonam
parents: 6848
diff changeset
113 }
0
a61af66fc99e Initial load
duke
parents:
diff changeset
114 public CollectedHeap heap() {
a61af66fc99e Initial load
duke
parents:
diff changeset
115 try {
a61af66fc99e Initial load
duke
parents:
diff changeset
116 return (CollectedHeap) heapConstructor.instantiateWrapperFor(collectedHeapField.getValue());
a61af66fc99e Initial load
duke
parents:
diff changeset
117 } catch (WrongTypeException e) {
a61af66fc99e Initial load
duke
parents:
diff changeset
118 return new CollectedHeap(collectedHeapField.getValue());
a61af66fc99e Initial load
duke
parents:
diff changeset
119 }
a61af66fc99e Initial load
duke
parents:
diff changeset
120 }
a61af66fc99e Initial load
duke
parents:
diff changeset
121
642
660978a2a31a 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 196
diff changeset
122 public static long getNarrowOopBase() {
660978a2a31a 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 196
diff changeset
123 if (narrowOopBaseField.getValue() == null) {
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
124 return 0;
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
125 } else {
642
660978a2a31a 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 196
diff changeset
126 return narrowOopBaseField.getValue().minus(null);
113
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
127 }
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
128 }
ba764ed4b6f2 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 0
diff changeset
129
642
660978a2a31a 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 196
diff changeset
130 public static int getNarrowOopShift() {
660978a2a31a 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 196
diff changeset
131 return (int)narrowOopShiftField.getValue();
660978a2a31a 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 196
diff changeset
132 }
660978a2a31a 6791178: Specialize for zero as the compressed oop vm heap base
kvn
parents: 196
diff changeset
133
6848
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
134 public static long getNarrowKlassBase() {
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
135 if (narrowKlassBaseField.getValue() == null) {
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
136 return 0;
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
137 } else {
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
138 return narrowKlassBaseField.getValue().minus(null);
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
139 }
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
140 }
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
141
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
142 public static int getNarrowKlassShift() {
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
143 return (int)narrowKlassShiftField.getValue();
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
144 }
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
145
8e47bac5643a 7054512: Compress class pointers after perm gen removal
roland
parents: 6725
diff changeset
146
0
a61af66fc99e Initial load
duke
parents:
diff changeset
147 /** Returns "TRUE" iff "p" points into the allocated area of the heap. */
a61af66fc99e Initial load
duke
parents:
diff changeset
148 public boolean isIn(Address p) {
a61af66fc99e Initial load
duke
parents:
diff changeset
149 return heap().isIn(p);
a61af66fc99e Initial load
duke
parents:
diff changeset
150 }
a61af66fc99e Initial load
duke
parents:
diff changeset
151
a61af66fc99e Initial load
duke
parents:
diff changeset
152 /** Returns "TRUE" iff "p" points into the reserved area of the heap. */
a61af66fc99e Initial load
duke
parents:
diff changeset
153 public boolean isInReserved(Address p) {
a61af66fc99e Initial load
duke
parents:
diff changeset
154 return heap().isInReserved(p);
a61af66fc99e Initial load
duke
parents:
diff changeset
155 }
a61af66fc99e Initial load
duke
parents:
diff changeset
156
a61af66fc99e Initial load
duke
parents:
diff changeset
157 private Oop newOop(OopHandle handle) {
a61af66fc99e Initial load
duke
parents:
diff changeset
158 return VM.getVM().getObjectHeap().newOop(handle);
a61af66fc99e Initial load
duke
parents:
diff changeset
159 }
a61af66fc99e Initial load
duke
parents:
diff changeset
160
a61af66fc99e Initial load
duke
parents:
diff changeset
161 public Oop mainThreadGroup() {
a61af66fc99e Initial load
duke
parents:
diff changeset
162 return newOop(mainThreadGroupField.getValue());
a61af66fc99e Initial load
duke
parents:
diff changeset
163 }
a61af66fc99e Initial load
duke
parents:
diff changeset
164
a61af66fc99e Initial load
duke
parents:
diff changeset
165 public Oop systemThreadGroup() {
a61af66fc99e Initial load
duke
parents:
diff changeset
166 return newOop(systemThreadGroupField.getValue());
a61af66fc99e Initial load
duke
parents:
diff changeset
167 }
a61af66fc99e Initial load
duke
parents:
diff changeset
168
a61af66fc99e Initial load
duke
parents:
diff changeset
169 // iterate through the single dimensional primitive array klasses
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
170 // refer to basic_type_classes_do(void f(Klass*)) in universe.cpp
0
a61af66fc99e Initial load
duke
parents:
diff changeset
171 public void basicTypeClassesDo(SystemDictionary.ClassVisitor visitor) {
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
172 visitor.visit(new TypeArrayKlass(boolArrayKlassField.getValue()));
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
173 visitor.visit(new TypeArrayKlass(byteArrayKlassField.getValue()));
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
174 visitor.visit(new TypeArrayKlass(charArrayKlassField.getValue()));
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
175 visitor.visit(new TypeArrayKlass(intArrayKlassField.getValue()));
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
176 visitor.visit(new TypeArrayKlass(shortArrayKlassField.getValue()));
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
177 visitor.visit(new TypeArrayKlass(longArrayKlassField.getValue()));
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
178 visitor.visit(new TypeArrayKlass(singleArrayKlassField.getValue()));
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 3972
diff changeset
179 visitor.visit(new TypeArrayKlass(doubleArrayKlassField.getValue()));
0
a61af66fc99e Initial load
duke
parents:
diff changeset
180 }
a61af66fc99e Initial load
duke
parents:
diff changeset
181
a61af66fc99e Initial load
duke
parents:
diff changeset
182 public void print() { printOn(System.out); }
a61af66fc99e Initial load
duke
parents:
diff changeset
183 public void printOn(PrintStream tty) {
a61af66fc99e Initial load
duke
parents:
diff changeset
184 heap().printOn(tty);
a61af66fc99e Initial load
duke
parents:
diff changeset
185 }
a61af66fc99e Initial load
duke
parents:
diff changeset
186
a61af66fc99e Initial load
duke
parents:
diff changeset
187 // Check whether an element of a typeArrayOop with the given type must be
a61af66fc99e Initial load
duke
parents:
diff changeset
188 // aligned 0 mod 8. The typeArrayOop itself must be aligned at least this
a61af66fc99e Initial load
duke
parents:
diff changeset
189 // strongly.
a61af66fc99e Initial load
duke
parents:
diff changeset
190 public static boolean elementTypeShouldBeAligned(BasicType type) {
a61af66fc99e Initial load
duke
parents:
diff changeset
191 return type == BasicType.T_DOUBLE || type == BasicType.T_LONG;
a61af66fc99e Initial load
duke
parents:
diff changeset
192 }
a61af66fc99e Initial load
duke
parents:
diff changeset
193
a61af66fc99e Initial load
duke
parents:
diff changeset
194 // Check whether an object field (static/non-static) of the given type must be
a61af66fc99e Initial load
duke
parents:
diff changeset
195 // aligned 0 mod 8.
a61af66fc99e Initial load
duke
parents:
diff changeset
196 public static boolean fieldTypeShouldBeAligned(BasicType type) {
a61af66fc99e Initial load
duke
parents:
diff changeset
197 return type == BasicType.T_DOUBLE || type == BasicType.T_LONG;
a61af66fc99e Initial load
duke
parents:
diff changeset
198 }
a61af66fc99e Initial load
duke
parents:
diff changeset
199 }