annotate agent/src/share/classes/sun/jvm/hotspot/oops/DataLayout.java @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents 4bec1b1f7b33
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3939
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
1 /*
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5981
diff changeset
2 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5981
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3939
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
4 *
5981
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
7 * published by the Free Software Foundation.
3939
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
8 *
5981
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
13 * accompanied this code).
3939
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
14 *
5981
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
15 * You should have received a copy of the GNU General Public License version
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3939
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
18 *
5981
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
4bec1b1f7b33 7156960: Incorrect copyright headers in parts of the Serviceability agent
minqi
parents: 3939
diff changeset
21 * questions.
3939
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
22 *
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
23 */
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
24
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
25 package sun.jvm.hotspot.oops;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
26
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
27 import java.io.*;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
28 import java.util.*;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
29 import sun.jvm.hotspot.debugger.*;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
30 import sun.jvm.hotspot.runtime.*;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
31 import sun.jvm.hotspot.types.*;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
32 import sun.jvm.hotspot.utilities.*;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
33
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
34 public class DataLayout {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
35 public static final int noTag = 0;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
36 public static final int bitDataTag = 1;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
37 public static final int counterDataTag = 2;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
38 public static final int jumpDataTag= 3;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
39 public static final int receiverTypeDataTag = 4;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
40 public static final int virtualCallDataTag = 5;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
41 public static final int retDataTag = 6;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
42 public static final int branchDataTag = 7;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
43 public static final int multiBranchDataTag = 8;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
44
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
45 // The _struct._flags word is formatted as [trapState:4 | flags:4].
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
46 // The trap state breaks down further as [recompile:1 | reason:3].
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
47 // This further breakdown is defined in deoptimization.cpp.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
48 // See Deoptimization.trapStateReason for an assert that
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
49 // trapBits is big enough to hold reasons < reasonRecordedLimit.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
50 //
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
51 // The trapState is collected only if ProfileTraps is true.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
52 public static final int trapBits = 1+3; // 3: enough to distinguish [0..reasonRecordedLimit].
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
53 public static final int trapShift = 8 - trapBits;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
54 public static final int trapMask = Bits.rightNBits(trapBits);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
55 public static final int trapMaskInPlace = (trapMask << trapShift);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
56 public static final int flagLimit = trapShift;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
57 public static final int flagMask = Bits.rightNBits(flagLimit);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
58 public static final int firstFlag = 0;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
59
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
60 private Address data;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
61
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
62 private int offset;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
63
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
64 private boolean handlized;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
65
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
66 public DataLayout(MethodData d, int o) {
6725
da91efe96a93 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 5981
diff changeset
67 data = d.getAddress();
3939
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
68 offset = o;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
69 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
70
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
71 public DataLayout(Address d, int o) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
72 data = d;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
73 offset = o;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
74 handlized = true;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
75 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
76
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
77 public int dp() { return offset; }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
78
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
79 private int getU11(int at) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
80 return data.getJByteAt(offset + at) & 0xff;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
81 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
82
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
83 private int getU22(int at) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
84 return data.getJShortAt(offset + at) & 0xffff;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
85 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
86
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
87 int cellAt(int index) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
88 // Cells are intptr_t sized but only contain ints as raw values
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
89 return (int)data.getCIntegerAt(offset + cellOffset(index), MethodData.cellSize, false);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
90 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
91
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
92 public Address addressAt(int index) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
93 OopHandle handle;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
94 if (handlized) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
95 return data.getAddressAt(offset + cellOffset(index));
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
96 } else {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
97 return data.getOopHandleAt(offset + cellOffset(index));
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
98 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
99 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
100
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
101 // Every data layout begins with a header. This header
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
102 // contains a tag, which is used to indicate the size/layout
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
103 // of the data, 4 bits of flags, which can be used in any way,
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
104 // 4 bits of trap history (none/one reason/many reasons),
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
105 // and a bci, which is used to tie this piece of data to a
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
106 // specific bci in the bytecodes.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
107 // union {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
108 // intptrT _bits;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
109 // struct {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
110 // u1 _tag;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
111 // u1 _flags;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
112 // u2 _bci;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
113 // } _struct;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
114 // } _header;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
115
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
116 // Some types of data layouts need a length field.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
117 static boolean needsArrayLen(int tag) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
118 return (tag == multiBranchDataTag);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
119 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
120
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
121 public static final int counterIncrement = 1;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
122
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
123 // Size computation
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
124 static int headerSizeInBytes() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
125 return MethodData.cellSize;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
126 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
127 static int headerSizeInCells() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
128 return 1;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
129 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
130
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
131 static int computeSizeInBytes(int cellCount) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
132 return headerSizeInBytes() + cellCount * MethodData.cellSize;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
133 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
134
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
135 // Initialization
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
136 // void initialize(int tag, int bci, int cellCount);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
137
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
138 // Accessors
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
139 public int tag() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
140 return getU11(0);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
141 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
142
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
143 // Return a few bits of trap state. Range is [0..trapMask].
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
144 // The state tells if traps with zero, one, or many reasons have occurred.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
145 // It also tells whether zero or many recompilations have occurred.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
146 // The associated trap histogram in the MDO itself tells whether
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
147 // traps are common or not. If a BCI shows that a trap X has
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
148 // occurred, and the MDO shows N occurrences of X, we make the
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
149 // simplifying assumption that all N occurrences can be blamed
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
150 // on that BCI.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
151 int trapState() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
152 return (flags() >> trapShift) & trapMask;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
153 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
154
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
155 int flags() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
156 return getU11(1);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
157 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
158
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
159 int bci() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
160 return getU22(2);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
161 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
162
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
163 boolean flagAt(int flagNumber) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
164 // assert(flagNumber < flagLimit, "oob");
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
165 return (flags() & (0x1 << flagNumber)) != 0;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
166 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
167
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
168 // Low-level support for code generation.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
169 static int headerOffset() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
170 return 0;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
171 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
172 static int tagOffset() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
173 return 0;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
174 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
175 static int flagsOffset() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
176 return 1;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
177 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
178 static int bciOffset() {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
179 return 2;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
180 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
181 public static int cellOffset(int index) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
182 return MethodData.cellSize + index * MethodData.cellSize;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
183 }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
184 // // Return a value which, when or-ed as a byte into _flags, sets the flag.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
185 // static int flagNumberToByteConstant(int flagNumber) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
186 // assert(0 <= flagNumber && flagNumber < flagLimit, "oob");
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
187 // DataLayout temp; temp.setHeader(0);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
188 // temp.setFlagAt(flagNumber);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
189 // return temp._header._struct._flags;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
190 // }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
191 // // Return a value which, when or-ed as a word into _header, sets the flag.
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
192 // static intptrT flagMaskToHeaderMask(int byteConstant) {
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
193 // DataLayout temp; temp.setHeader(0);
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
194 // temp._header._struct._flags = byteConstant;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
195 // return temp._header._bits;
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
196 // }
f6f3bb0ee072 7088955: add C2 IR support to the SA
never
parents:
diff changeset
197 }