-Xdump agents are always merged internally by the JVM, as long as none of the agent settings conflict with each other.
If you configure more than one dump agent, each responds to events according to its configuration. However, the internal structures representing the dump agent configuration might not match the command line, because dump agents are merged for efficiency. Two sets of options can be merged as long as none of the agent settings conflict. This means that the list of installed dump agents and their parameters produced by -Xdump:what might not be grouped in the same way as the original -Xdump options that configured them.
java -Xdump:java:events=unload -Xdump:whatThis command does not create a new agent, as can be seen in the results from the -Xdump:what option.
... ---------------------- -Xdump:java: events=gpf+user+abort+unload, label=/home/user/javacore.%Y%m%d.%H%M%S.%pid.%seq.txt, range=1..0, priority=10, request=exclusive ----------------------The configuration is merged with the existing javadump agent for events gpf, user, and abort, because none of the specified options for the new unload agent conflict with those for the existing agent.
java -Xdump:java:events=unload,priority=100 -Xdump:whatThe results of the -Xdump:what option in the command are as follows.
... ---------------------- -Xdump:java: events=unload, label=/home/user/javacore.%Y%m%d.%H%M%S.%pid.%seq.txt, range=1..0, priority=100, request=exclusive ---------------------- -Xdump:java: events=gpf+user+abort, label=/home/user/javacore.%Y%m%d.%H%M%S.%pid.%seq.txt, range=1..0, priority=10, request=exclusive ----------------------
java -Xdump:none -Xdump:java:events=uncaught,filter=java/lang/NullPointerException \\ -Xdump:java:events=unload,filter=java/lang/NullPointerException -Xdump:whatThe results of this command are as follows.
Registered dump agents ---------------------- -Xdump:java: events=unload+uncaught, filter=java/lang/NullPointerException, label=/home/user/javacore.%Y%m%d.%H%M%S.%pid.%seq.txt, range=1..0, priority=10, request=exclusive ----------------------