RFR: 8041626: [Event Request] Shutdown reason
robin.westberg at oracle.com
Wed Feb 7 20:52:13 UTC 2018
> On 7 Feb 2018, at 16:30, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 07/02/2018 15:18, Robin Westberg wrote:
>> Hi all,
>> Please review the following change that adds an event-based tracing event that is generated when the VM shuts down. The intent is to capture shutdowns that occur after the VM has been properly initialized (as initialization problems would most likely mean that the tracing framework hasn’t been properly started either).
>> Issue: https://bugs.openjdk.java.net/browse/JDK-8041626
>> Webrev: http://cr.openjdk.java.net/~rwestberg/8041626/webrev.00/ <http://cr.openjdk.java.net/%7Erwestberg/8041626/webrev.00/>
>> Testing: hs-tier1,hs-tier2,jdk-tier1,jdk-tier2
> Can you elaborate a bit on why this isn't in JVM_Halt? Is this partially to help with cases where the shutdown hooks or finalizers run at exit cause issues?
Sure, the main problem I had with that approach is actually that the tracing framework shuts down from a shutdown hook, so events generated in JVM_Halt will be lost. And I couldn’t think of any good way to capture the exit code and proper stack trace from inside that shutdown hook, but I could perhaps explore that option a bit further.
More information about the core-libs-dev