--- a/src/jdk.jfr/share/classes/jdk/jfr/consumer/ChunkParser.java Thu Jul 11 02:18:31 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/consumer/ChunkParser.java Thu Jul 11 02:21:18 2019 +0200
@@ -256,17 +256,16 @@
}
for (int j = 0; j < count; j++) {
long key = input.readLong();
-// Object resolved = lookup.getCurrent(key);
-// Disable cache Object resolved = lookup.getResolved(key);
-// if (resolved == null) {
+ Object resolved = lookup.getPreviousResolved(key);
+ if (resolved == null) {
Object v = parser.parse(input);
logConstant(key, v, false);
lookup.getLatestPool().put(key, v);
-// } else {
-// parser.skip(input);
-// logConstant(key, resolved, true);
-// Disable cache lookup.getLatestPool().putResolved(key, resolved);
-// }
+ } else {
+ parser.skip(input);
+ logConstant(key, resolved, true);
+ lookup.getLatestPool().putResolved(key, resolved);
+ }
}
} catch (Exception e) {
throw new IOException("Error parsing constant pool type " + getName(id) + " at position " + input.position() + " at check point between [" + lastCP + ", " + lastCP + size + "]",
--- a/src/jdk.jfr/share/classes/jdk/jfr/consumer/ConstantLookup.java Thu Jul 11 02:18:31 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/consumer/ConstantLookup.java Thu Jul 11 02:21:18 2019 +0200
@@ -22,7 +22,7 @@
}
public void newPool() {
- // previous = current;
+ previous = current;
current = new ConstantMap(current.factory, current.name);
// previous = new ConstantMap(); // disable cache
}
--- a/src/jdk.jfr/share/classes/jdk/jfr/consumer/ConstantMap.java Thu Jul 11 02:18:31 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/consumer/ConstantMap.java Thu Jul 11 02:21:18 2019 +0200
@@ -174,8 +174,8 @@
}
public void putResolved(long id, Object object) {
+ objects.put(id, object);
objects.setId(id, RESOLUTION_FINISHED);
- objects.put(id, object);
}
public void setAllResolved(boolean allResolved) {