src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordingStream.java
branchJEP-349-branch
changeset 57717 4ce66d271065
parent 57690 9316d02dd4a5
child 57944 f1610739fe86
equal deleted inserted replaced
57702:c75c241c492a 57717:4ce66d271065
    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