8159127: hprof heap dumps broken for lambda classdata
Added class dump records for lambda related anonymous classes in the heap dump Reviewed-by: dsamersoff, sspitsyn
This commit is contained in:
parent
ab77975179
commit
6feb27b225
@ -151,6 +151,10 @@ public class HprofReader extends Reader /* imports */ implements ArrayTypeCodes
|
||||
|
||||
private Snapshot snapshot;
|
||||
|
||||
public static boolean verifyMagicNumber(int numberRead) {
|
||||
return (numberRead == MAGIC_NUMBER);
|
||||
}
|
||||
|
||||
public HprofReader(String fileName, PositionDataInputStream in,
|
||||
int dumpNumber, boolean callStack, int debugLevel)
|
||||
throws IOException {
|
||||
@ -737,6 +741,12 @@ public class HprofReader extends Reader /* imports */ implements ArrayTypeCodes
|
||||
long id = readID();
|
||||
StackTrace stackTrace = getStackTraceFromSerial(in.readInt());
|
||||
long classID = readID();
|
||||
JavaClass searchedClass = snapshot.findClass(
|
||||
"0x" + Long.toHexString(classID));
|
||||
if (searchedClass == null) {
|
||||
throw new IOException(
|
||||
"Class Record for 0x" + Long.toHexString(classID) + " not found");
|
||||
}
|
||||
int bytesFollowing = in.readInt();
|
||||
int bytesRead = (2 * identifierSize) + 8 + bytesFollowing;
|
||||
JavaObject jobj = new JavaObject(classID, start);
|
||||
|
Loading…
x
Reference in New Issue
Block a user