diff -r 80e1201f6c9a -r a0f39cc47387 src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/AbstractEventStream.java --- a/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/AbstractEventStream.java Fri Nov 22 09:06:35 2019 -0500 +++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/AbstractEventStream.java Fri Nov 22 17:20:43 2019 +0100 @@ -40,6 +40,7 @@ import jdk.jfr.internal.LogLevel; import jdk.jfr.internal.LogTag; import jdk.jfr.internal.Logger; +import jdk.jfr.internal.PlatformRecording; import jdk.jfr.internal.SecuritySupport; /* @@ -50,19 +51,19 @@ private final static AtomicLong counter = new AtomicLong(1); private final Object terminated = new Object(); - private final boolean active; private final Runnable flushOperation = () -> dispatcher().runFlushActions(); private final AccessControlContext accessControllerContext; private final StreamConfiguration configuration = new StreamConfiguration(); + private final PlatformRecording recording; private volatile Thread thread; private Dispatcher dispatcher; private volatile boolean closed; - AbstractEventStream(AccessControlContext acc, boolean active) throws IOException { + AbstractEventStream(AccessControlContext acc, PlatformRecording recording) throws IOException { this.accessControllerContext = Objects.requireNonNull(acc); - this.active = active; + this.recording = recording; } @Override @@ -229,7 +230,7 @@ if (configuration.started) { throw new IllegalStateException("Event stream can only be started once"); } - if (active && configuration.startTime == null) { + if (recording != null && configuration.startTime == null) { configuration.setStartNanos(startNanos); } configuration.setStarted(true);