提交 d4a636fd 编写于 作者: D Denghui Dong 提交者: D-D-H

[Backport] 8234059: Stress test fails with "Unexpected Exception in thread JFR Event Stream"

Summary:

Test Plan: jdk/jfr

Reviewed-by: yuleil

Issue: https://github.com/alibaba/dragonwell8/issues/112
上级 986e181d
...@@ -25,6 +25,10 @@ ...@@ -25,6 +25,10 @@
package jdk.jfr.internal.consumer; package jdk.jfr.internal.consumer;
import jdk.jfr.internal.LogLevel;
import jdk.jfr.internal.LogTag;
import jdk.jfr.internal.Logger;
import jdk.jfr.internal.LongMap; import jdk.jfr.internal.LongMap;
/** /**
...@@ -90,14 +94,14 @@ final class ConstantMap { ...@@ -90,14 +94,14 @@ final class ConstantMap {
return new Reference(this, id); return new Reference(this, id);
} }
// should always have a value // should ideally always have a value
Object value = objects.get(id); Object value = objects.get(id);
if (value == null) { if (value == null) {
// unless is 0 which is used to represent null // unless id is 0 which is used to represent null
if (id == 0) { if (id != 0) {
return null; Logger.log(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO, "Missing object id=" + id + " in pool " + name + ". All ids should reference an object");
} }
throw new InternalError("Missing object id=" + id + " in pool " + name + ". All ids should reference object"); return null;
} }
// id is resolved (but not the whole pool) // id is resolved (but not the whole pool)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册