--- a/src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordingStream.java Mon Aug 05 23:57:47 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordingStream.java Fri Aug 09 01:18:18 2019 +0200
@@ -41,6 +41,7 @@
import jdk.jfr.internal.PlatformRecording;
import jdk.jfr.internal.PrivateAccess;
import jdk.jfr.internal.Utils;
+import jdk.jfr.internal.consumer.FileAccess;
/**
* A recording stream produces events from the current JVM (Java Virtual
@@ -99,7 +100,7 @@
this.recording = new Recording();
this.recording.setFlushInterval(Duration.ofMillis(1000));
try {
- this.stream = new EventDirectoryStream(acc, null, null);
+ this.stream = new EventDirectoryStream(acc, null, FileAccess.PRIVILIGED, true);
} catch (IOException ioe) {
throw new IllegalStateException(ioe.getMessage());
}
@@ -356,4 +357,9 @@
public void setStartTime(Instant startTime) {
stream.setStartTime(startTime);
}
+
+ @Override
+ public void setEndTime(Instant endTime) {
+ stream.setStartTime(endTime);
+ }
}