src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordingStream.java
changeset 59226 a0f39cc47387
parent 58863 c16ac7a2eba4
equal deleted inserted replaced
59225:80e1201f6c9a 59226:a0f39cc47387
    86         Utils.checkAccessFlightRecorder();
    86         Utils.checkAccessFlightRecorder();
    87         AccessControlContext acc = AccessController.getContext();
    87         AccessControlContext acc = AccessController.getContext();
    88         this.recording = new Recording();
    88         this.recording = new Recording();
    89         this.recording.setFlushInterval(Duration.ofMillis(1000));
    89         this.recording.setFlushInterval(Duration.ofMillis(1000));
    90         try {
    90         try {
    91             this.directoryStream = new EventDirectoryStream(acc, null, SecuritySupport.PRIVILIGED, true);
    91             PlatformRecording pr = PrivateAccess.getInstance().getPlatformRecording(recording);
       
    92             this.directoryStream = new EventDirectoryStream(acc, null, SecuritySupport.PRIVILIGED, pr);
    92         } catch (IOException ioe) {
    93         } catch (IOException ioe) {
    93             this.recording.close();
    94             this.recording.close();
    94             throw new IllegalStateException(ioe.getMessage());
    95             throw new IllegalStateException(ioe.getMessage());
    95         }
    96         }
    96     }
    97     }