Skip to content

Commit f31be3f

Browse files
committed
8379925: [lworld] Several SA HeapDump tests fail with Unrecognized heap dump sub-record type: XX with --enable-preview
8377387: [lworld] serviceability/sa/TestHeapDumpForInvokeDynamic.java test fails with --enable-preview Reviewed-by: sspitsyn
1 parent 53472ee commit f31be3f

4 files changed

Lines changed: 6 additions & 9 deletions

File tree

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/Field.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ public int getFieldIndex() {
220220
public boolean isGeneric() { return fieldIsGeneric(values.fieldFlags); }
221221
public boolean isStable() { return fieldIsStable(values.fieldFlags); }
222222
public boolean isContended() { return fieldIsContended(values.fieldFlags); }
223+
public boolean isFlat() { return fieldIsFlat(values.fieldFlags); }
223224

224225
public boolean equals(Object obj) {
225226
if (obj == null) {

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/HeapHprofBinWriter.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,11 @@ private void writeField(Field field, Oop oop) throws IOException {
12031203
break;
12041204
case JVM_SIGNATURE_CLASS:
12051205
case JVM_SIGNATURE_ARRAY: {
1206-
if (VM.getVM().isCompressedOopsEnabled()) {
1206+
if (field.isFlat()) {
1207+
// FIXME - we don't handle flattened fields yet. Just treat them
1208+
// as a null reference. See JDK-8381370.
1209+
writeObjectID(null);
1210+
} else if (VM.getVM().isCompressedOopsEnabled()) {
12071211
OopHandle handle = ((NarrowOopField)field).getValueAsOopHandle(oop);
12081212
writeObjectID(getAddressValue(handle));
12091213
} else {

test/hotspot/jtreg/ProblemList-enable-preview.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,3 @@ compiler/stable/TestStableArrayMembars.java
4141

4242
# Serviceability:
4343
vmTestbase/nsk/jdi/Accessible/modifiers/modifiers001/TestDescription.java 8375069 generic-all
44-
serviceability/sa/ClhsdbDumpheap.java 8379925 generic-all
45-
serviceability/sa/TestHeapDumpForInvokeDynamic.java 8377387 generic-all
46-
serviceability/sa/TestJmapCore.java 8379925 generic-all
47-
serviceability/sa/TestJmapCoreMetaspace.java 8379925 generic-all

test/jdk/ProblemList-enable-preview.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,3 @@
3232

3333
# Valhalla failures start here:
3434
com/sun/jdi/EATests.java#id0 8372831 generic-all
35-
36-
sun/tools/jhsdb/HeapDumpTest.java 8379925 generic-all
37-
sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java 8379925 generic-all
38-
sun/tools/jhsdb/JShellHeapDumpTest.java 8379925 generic-all

0 commit comments

Comments
 (0)