提交 501d313d 编写于 作者: R rwestberg

8041626: Shutdown tracing event

Reviewed-by: dholmes, alanb, rriggs
上级 3e05da39
......@@ -205,6 +205,7 @@ SUNWprivate_1.1 {
Java_java_lang_SecurityManager_currentClassLoader0;
Java_java_lang_SecurityManager_currentLoadedClass0;
Java_java_lang_SecurityManager_getClassContext;
Java_java_lang_Shutdown_beforeHalt;
Java_java_lang_Shutdown_halt0;
Java_java_lang_String_intern;
Java_java_lang_System_identityHashCode;
......
......@@ -272,6 +272,7 @@ public class Runtime {
if (sm != null) {
sm.checkExit(status);
}
Shutdown.beforeHalt();
Shutdown.halt(status);
}
......
/*
* 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);
}
......
......@@ -131,6 +131,9 @@ JVM_CopySwapMemory(JNIEnv *env, jobject srcObj, jlong srcOffset,
JNIEXPORT void JNICALL
JVM_Exit(jint code);
JNIEXPORT void JNICALL
JVM_BeforeHalt();
JNIEXPORT void JNICALL
JVM_Halt(jint code);
......
/*
* Copyright (c) 1999, 2003, 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
......@@ -29,6 +29,11 @@
#include "java_lang_Shutdown.h"
JNIEXPORT void JNICALL
Java_java_lang_Shutdown_beforeHalt(JNIEnv *env, jclass ignored)
{
JVM_BeforeHalt();
}
JNIEXPORT void JNICALL
Java_java_lang_Shutdown_halt0(JNIEnv *env, jclass ignored, jint code)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册