1
1
/*
2
- * Copyright (c) 2020, 2023 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2020, 2024 , Oracle and/or its affiliates. All rights reserved.
3
3
* Copyright (c) 2020, 2020, Red Hat Inc. All rights reserved.
4
4
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
5
*
@@ -167,27 +167,31 @@ public abstract class DebugInfoBase {
167
167
/**
168
168
* Number of bits oops are left shifted by when using compressed oops.
169
169
*/
170
- private int oopCompressShift ;
170
+ private int compressionShift ;
171
+ /**
172
+ * Bit mask used for tagging oops.
173
+ */
174
+ private int reservedBitsMask ;
171
175
/**
172
176
* Number of low order bits used for tagging oops.
173
177
*/
174
- private int oopTagsCount ;
178
+ private int numReservedBits ;
175
179
/**
176
180
* Number of bytes used to store an oop reference.
177
181
*/
178
- private int oopReferenceSize ;
182
+ private int referenceSize ;
179
183
/**
180
184
* Number of bytes used to store a raw pointer.
181
185
*/
182
186
private int pointerSize ;
183
187
/**
184
188
* Alignment of object memory area (and, therefore, of any oop) in bytes.
185
189
*/
186
- private int oopAlignment ;
190
+ private int objectAlignment ;
187
191
/**
188
192
* Number of bits in oop which are guaranteed 0 by virtue of alignment.
189
193
*/
190
- private int oopAlignShift ;
194
+ private int numAlignmentBits ;
191
195
/**
192
196
* The compilation directory in which to look for source files as a {@link String}.
193
197
*/
@@ -207,12 +211,13 @@ public abstract class DebugInfoBase {
207
211
public DebugInfoBase (ByteOrder byteOrder ) {
208
212
this .byteOrder = byteOrder ;
209
213
this .useHeapBase = true ;
210
- this .oopTagsCount = 0 ;
211
- this .oopCompressShift = 0 ;
212
- this .oopReferenceSize = 0 ;
214
+ this .reservedBitsMask = 0 ;
215
+ this .numReservedBits = 0 ;
216
+ this .compressionShift = 0 ;
217
+ this .referenceSize = 0 ;
213
218
this .pointerSize = 0 ;
214
- this .oopAlignment = 0 ;
215
- this .oopAlignShift = 0 ;
219
+ this .objectAlignment = 0 ;
220
+ this .numAlignmentBits = 0 ;
216
221
this .hubClassEntry = null ;
217
222
this .compiledCodeMax = 0 ;
218
223
// create and index an empty dir with index 0.
@@ -245,35 +250,33 @@ public void installDebugInfo(DebugInfoProvider debugInfoProvider) {
245
250
/*
246
251
* Save count of low order tag bits that may appear in references.
247
252
*/
248
- int oopTagsMask = debugInfoProvider .oopTagsMask ();
253
+ reservedBitsMask = debugInfoProvider .reservedBitsMask ();
249
254
250
- /* Tag bits must be between 0 and 32 for us to emit as DW_OP_lit<n>. */
251
- assert oopTagsMask >= 0 && oopTagsMask < 32 ;
252
255
/* Mask must be contiguous from bit 0. */
253
- assert ((oopTagsMask + 1 ) & oopTagsMask ) == 0 ;
256
+ assert ((reservedBitsMask + 1 ) & reservedBitsMask ) == 0 ;
254
257
255
- oopTagsCount = Integer .bitCount (oopTagsMask );
258
+ numReservedBits = Integer .bitCount (reservedBitsMask );
256
259
257
260
/* Save amount we need to shift references by when loading from an object field. */
258
- oopCompressShift = debugInfoProvider .oopCompressShift ();
261
+ compressionShift = debugInfoProvider .compressionShift ();
259
262
260
263
/* shift bit count must be either 0 or 3 */
261
- assert (oopCompressShift == 0 || oopCompressShift == 3 );
264
+ assert (compressionShift == 0 || compressionShift == 3 );
262
265
263
266
/* Save number of bytes in a reference field. */
264
- oopReferenceSize = debugInfoProvider .oopReferenceSize ();
267
+ referenceSize = debugInfoProvider .referenceSize ();
265
268
266
269
/* Save pointer size of current target. */
267
270
pointerSize = debugInfoProvider .pointerSize ();
268
271
269
272
/* Save alignment of a reference. */
270
- oopAlignment = debugInfoProvider .oopAlignment ();
273
+ objectAlignment = debugInfoProvider .objectAlignment ();
271
274
272
275
/* Save alignment of a reference. */
273
- oopAlignShift = Integer .bitCount (oopAlignment - 1 );
276
+ numAlignmentBits = Integer .bitCount (objectAlignment - 1 );
274
277
275
278
/* Reference alignment must be 8 bytes. */
276
- assert oopAlignment == 8 ;
279
+ assert objectAlignment == 8 ;
277
280
278
281
/* retrieve limit for Java code address range */
279
282
compiledCodeMax = debugInfoProvider .compiledCodeMax ();
@@ -702,32 +705,32 @@ public boolean useHeapBase() {
702
705
return useHeapBase ;
703
706
}
704
707
705
- public byte oopTagsMask () {
706
- return ( byte ) (( 1 << oopTagsCount ) - 1 ) ;
708
+ public int reservedBitsMask () {
709
+ return reservedBitsMask ;
707
710
}
708
711
709
- public byte oopTagsShift () {
710
- return ( byte ) oopTagsCount ;
712
+ public int numReservedBits () {
713
+ return numReservedBits ;
711
714
}
712
715
713
- public int oopCompressShift () {
714
- return oopCompressShift ;
716
+ public int compressionShift () {
717
+ return compressionShift ;
715
718
}
716
719
717
- public int oopReferenceSize () {
718
- return oopReferenceSize ;
720
+ public int referenceSize () {
721
+ return referenceSize ;
719
722
}
720
723
721
724
public int pointerSize () {
722
725
return pointerSize ;
723
726
}
724
727
725
- public int oopAlignment () {
726
- return oopAlignment ;
728
+ public int objectAlignment () {
729
+ return objectAlignment ;
727
730
}
728
731
729
- public int oopAlignShift () {
730
- return oopAlignShift ;
732
+ public int numAlignmentBits () {
733
+ return numAlignmentBits ;
731
734
}
732
735
733
736
public String getCachePath () {
0 commit comments