Some JVM events occur thousands of times during the lifetime of an application. Dump agents can use filters and ranges to avoid excessive dumps being produced.
-Xdump:java:events=vmstop,filter=*InvalidArgumentException#*.myVirtualMethod
-Xdump:java:events=vmstop,filter=*InvalidArgumentException#MyApplication.*
You can filter class loading (load) and exception (throw, catch, uncaught, systhrow) events by Java™ class name:
-Xdump:java:events=throw,filter=java/lang/OutOfMem* -Xdump:java:events=throw,filter=*MemoryError -Xdump:java:events=throw,filter=*Memory*
From Java 6 SR 3, you can filter throw, uncaught, and systhrow exception events by Java method name:
-Xdump:java:events=throw,filter=ExceptionClassName[#ThrowingClassName.throwingMethodName[#stackFrameOffset]]
Optional portions are shown in square brackets.
-Xdump:java:events=catch,filter=ExceptionClassName[#CatchingClassName.catchingMethodName]
Optional portions are shown in square brackets.
-Xdump:java:events=vmstop,filter=#129..192#-42#255
You can filter the slow event to change the time threshold from the default of 5 ms:
-Xdump:java:events=slow,filter=#300ms
You cannot set the filter to a time lower than the default time.
If you apply a filter to an event that does not support filtering, the filter is ignored.