equal
deleted
inserted
replaced
38 import jdk.jfr.EventSettings; |
38 import jdk.jfr.EventSettings; |
39 import jdk.jfr.EventType; |
39 import jdk.jfr.EventType; |
40 import jdk.jfr.Recording; |
40 import jdk.jfr.Recording; |
41 import jdk.jfr.internal.PlatformRecording; |
41 import jdk.jfr.internal.PlatformRecording; |
42 import jdk.jfr.internal.PrivateAccess; |
42 import jdk.jfr.internal.PrivateAccess; |
|
43 import jdk.jfr.internal.SecuritySupport; |
43 import jdk.jfr.internal.Utils; |
44 import jdk.jfr.internal.Utils; |
44 import jdk.jfr.internal.consumer.FileAccess; |
|
45 |
45 |
46 /** |
46 /** |
47 * A recording stream produces events from the current JVM (Java Virtual |
47 * A recording stream produces events from the current JVM (Java Virtual |
48 * Machine). |
48 * Machine). |
49 * <p> |
49 * <p> |
98 Utils.checkAccessFlightRecorder(); |
98 Utils.checkAccessFlightRecorder(); |
99 AccessControlContext acc = AccessController.getContext(); |
99 AccessControlContext acc = AccessController.getContext(); |
100 this.recording = new Recording(); |
100 this.recording = new Recording(); |
101 this.recording.setFlushInterval(Duration.ofMillis(1000)); |
101 this.recording.setFlushInterval(Duration.ofMillis(1000)); |
102 try { |
102 try { |
103 this.stream = new EventDirectoryStream(acc, null, FileAccess.PRIVILIGED, true); |
103 this.stream = new EventDirectoryStream(acc, null, SecuritySupport.PRIVILIGED, true); |
104 } catch (IOException ioe) { |
104 } catch (IOException ioe) { |
105 throw new IllegalStateException(ioe.getMessage()); |
105 throw new IllegalStateException(ioe.getMessage()); |
106 } |
106 } |
107 } |
107 } |
108 |
108 |