Enable parser level filtering JEP-349-branch
authoregahlin
Tue, 25 Jun 2019 14:02:06 +0200
branchJEP-349-branch
changeset 57428 ef3e241c420f
parent 57427 596f839ce88f
child 57432 ba454a26d2c1
Enable parser level filtering
src/jdk.jfr/share/classes/jdk/jfr/consumer/ChunkParser.java
src/jdk.jfr/share/classes/jdk/jfr/consumer/EventDirectoryStream.java
--- a/src/jdk.jfr/share/classes/jdk/jfr/consumer/ChunkParser.java	Tue Jun 25 13:32:03 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/consumer/ChunkParser.java	Tue Jun 25 14:02:06 2019 +0200
@@ -110,10 +110,7 @@
     }
 
     public void setParserFilter(InternalEventFilter filter) {
-    // Disable low level filter, since it doesn't work
-    // when a psrser is shared
-    //    this.eventFilter = filter;
-    //    updateParserFilters();
+        this.eventFilter = filter;
     }
 
     public InternalEventFilter getEventFilter() {
@@ -121,7 +118,6 @@
     }
 
 
-
     /**
      * Reads an event and returns null when segment or chunk ends.
      */
--- a/src/jdk.jfr/share/classes/jdk/jfr/consumer/EventDirectoryStream.java	Tue Jun 25 13:32:03 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/consumer/EventDirectoryStream.java	Tue Jun 25 14:02:06 2019 +0200
@@ -189,6 +189,7 @@
                         chunkParser.setReuse(this.reuse);
                         chunkParser.setOrdered(this.ordered);
                         chunkParser.resetEventCache();
+                        chunkParser.setParserFilter(this.eventFilter);
                         chunkParser.updateEventParsers();
                         if (ordered) {
                             awaitnewEvent = processOrdered(awaitnewEvent);