diff --git a/substratevm/src/com.oracle.svm.jfr/src/com/oracle/svm/jfr/JfrTypeRepository.java b/substratevm/src/com.oracle.svm.jfr/src/com/oracle/svm/jfr/JfrTypeRepository.java index d4a4834f6522..a9a3efafd263 100644 --- a/substratevm/src/com.oracle.svm.jfr/src/com/oracle/svm/jfr/JfrTypeRepository.java +++ b/substratevm/src/com.oracle.svm.jfr/src/com/oracle/svm/jfr/JfrTypeRepository.java @@ -186,7 +186,7 @@ public int writeClasses(JfrChunkWriter writer, TypeInfo typeInfo) throws IOExcep return 0; } writer.writeCompressedLong(JfrTypes.Class.getId()); - writer.writeCompressedInt(JfrTraceIdLoadBarrier.classCount(JfrTraceIdEpoch.getInstance().previousEpoch())); + writer.writeCompressedInt(typeInfo.getClasses().size()); for (Class clazz : typeInfo.getClasses()) { writeClass(writer, typeInfo, clazz);