Mercurial > hg > truffle
changeset 15694:7b999df1dabc
ensure Graal C++ shutdown routines are called exactly once during VM shutdown
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 15 May 2014 22:43:44 +0200 |
parents | 807090ddbbf2 |
children | 128359d7cddc |
files | src/share/vm/runtime/java.cpp |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/runtime/java.cpp Thu May 15 22:42:08 2014 +0200 +++ b/src/share/vm/runtime/java.cpp Thu May 15 22:43:44 2014 +0200 @@ -462,15 +462,6 @@ #define BEFORE_EXIT_DONE 2 static jint volatile _before_exit_status = BEFORE_EXIT_NOT_RUN; -#ifdef GRAAL -#ifdef COMPILERGRAAL - if (GraalCompiler::instance() != NULL) { - GraalCompiler::instance()->shutdown(); - } -#endif - VMToCompiler::shutdownRuntime(); -#endif - // Note: don't use a Mutex to guard the entire before_exit(), as // JVMTI post_thread_end_event and post_vm_death_event will run native code. // A CAS or OSMutex would work just fine but then we need to manipulate @@ -492,6 +483,15 @@ } } +#ifdef GRAAL +#ifdef COMPILERGRAAL + if (GraalCompiler::instance() != NULL) { + GraalCompiler::instance()->shutdown(); + } +#endif + VMToCompiler::shutdownRuntime(); +#endif + // The only difference between this and Win32's _onexit procs is that // this version is invoked before any threads get killed. ExitProc* current = exit_procs;