--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataRepository.java Mon Sep 16 11:18:50 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataRepository.java Mon Sep 16 12:47:53 2019 +0200
@@ -62,8 +62,7 @@
private boolean staleMetadata = true;
private boolean unregistered;
private long lastUnloaded = -1;
- private boolean flushMetadata;
- private short flushCounter = 0;
+ private boolean flushMetadata;
public MetadataRepository() {
initializeJVMEventTypes();
@@ -280,7 +279,6 @@
if (staleMetadata) {
storeDescriptorInJVM();
}
- flushCounter = 0;
}
private void unregisterUnloaded() {
@@ -320,10 +318,7 @@
}
public synchronized void flush() {
- jvm.flush(flushMetadata || flushCounter == 0, ++flushCounter);
- if (flushCounter == Short.MAX_VALUE) {
- flushCounter = 0;
- }
+ jvm.flush(flushMetadata);
this.flushMetadata = false;
}