8041626: Shutdown tracing event

Reviewed-by: dholmes, alanb, rriggs
This commit is contained in:
Robin Westberg 2018-02-13 15:48:23 +01:00
parent 5287d9a366
commit f2c21c058d
10 changed files with 47 additions and 5 deletions

View file

@ -280,6 +280,7 @@ public class Runtime {
if (sm != null) {
sm.checkExit(status);
}
Shutdown.beforeHalt();
Shutdown.halt(status);
}

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -130,6 +130,9 @@ class Shutdown {
}
}
/* Notify the VM that it's time to halt. */
static native void beforeHalt();
/* The halt method is synchronized on the halt lock
* to avoid corruption of the delete-on-shutdown file list.
* It invokes the true native halt method.
@ -209,6 +212,7 @@ class Shutdown {
/* Synchronize on the class object, causing any other thread
* that attempts to initiate shutdown to stall indefinitely
*/
beforeHalt();
sequence();
halt(status);
}