equal
deleted
inserted
replaced
38 import java.util.List; |
38 import java.util.List; |
39 import java.util.Objects; |
39 import java.util.Objects; |
40 import java.util.function.Consumer; |
40 import java.util.function.Consumer; |
41 |
41 |
42 import jdk.jfr.EventType; |
42 import jdk.jfr.EventType; |
|
43 import jdk.jfr.internal.JVM; |
43 import jdk.jfr.internal.LogLevel; |
44 import jdk.jfr.internal.LogLevel; |
44 import jdk.jfr.internal.LogTag; |
45 import jdk.jfr.internal.LogTag; |
45 import jdk.jfr.internal.Logger; |
46 import jdk.jfr.internal.Logger; |
46 import jdk.jfr.internal.LongMap; |
47 import jdk.jfr.internal.LongMap; |
47 import jdk.jfr.internal.consumer.InternalEventFilter; |
48 import jdk.jfr.internal.consumer.InternalEventFilter; |
309 private EventType lastEventType; |
310 private EventType lastEventType; |
310 private EventDispatcher[] lastEventDispatch; |
311 private EventDispatcher[] lastEventDispatch; |
311 |
312 |
312 public AbstractEventStream(AccessControlContext acc) throws IOException { |
313 public AbstractEventStream(AccessControlContext acc) throws IOException { |
313 this.accessControlContext = acc; |
314 this.accessControlContext = acc; |
314 // Create thread object in constructor to ensure caller has permission |
315 // Create thread object in constructor to ensure caller has |
315 // permission before constructing object |
316 // permission before constructing object |
316 thread = new Thread(this); |
317 thread = new Thread(this); |
317 thread.setDaemon(true); |
318 thread.setDaemon(true); |
318 } |
319 } |
319 |
320 |
327 }, accessControlContext); |
328 }, accessControlContext); |
328 |
329 |
329 } |
330 } |
330 |
331 |
331 private void execute() { |
332 private void execute() { |
332 // JVM.getJVM().exclude(Thread.currentThread()); |
333 JVM.getJVM().exclude(Thread.currentThread()); |
333 try { |
334 try { |
334 updateStartNanos(); |
335 updateStartNanos(); |
335 process(); |
336 process(); |
336 } catch (IOException e) { |
337 } catch (IOException e) { |
337 if (!isClosed()) { |
338 if (!isClosed()) { |