7188234: Deprecate VM command line options
Summary: Remove support for the UseVectoredExceptions flag
Reviewed-by: jcoomes, kamg
Contributed-by: harold.seigel@oracle.com
--- a/hotspot/src/os/windows/vm/os_windows.cpp Mon Oct 22 12:01:35 2012 -0400
+++ b/hotspot/src/os/windows/vm/os_windows.cpp Thu Oct 25 16:33:15 2012 -0400
@@ -22,7 +22,7 @@
*
*/
-// Must be at least Windows 2000 or XP to use VectoredExceptions and IsDebuggerPresent
+// Must be at least Windows 2000 or XP to use IsDebuggerPresent
#define _WIN32_WINNT 0x500
// no precompiled headers
@@ -110,10 +110,6 @@
static FILETIME process_user_time;
static FILETIME process_kernel_time;
-#ifdef _WIN64
-PVOID topLevelVectoredExceptionHandler = NULL;
-#endif
-
#ifdef _M_IA64
#define __CPU__ ia64
#elif _M_AMD64
@@ -136,12 +132,6 @@
case DLL_PROCESS_DETACH:
if(ForceTimeHighResolution)
timeEndPeriod(1L);
-#ifdef _WIN64
- if (topLevelVectoredExceptionHandler != NULL) {
- RemoveVectoredExceptionHandler(topLevelVectoredExceptionHandler);
- topLevelVectoredExceptionHandler = NULL;
- }
-#endif
break;
default:
break;
@@ -408,20 +398,14 @@
}
- if (UseVectoredExceptions) {
- // If we are using vectored exception we don't need to set a SEH
- thread->run();
- }
- else {
- // Install a win32 structured exception handler around every thread created
- // by VM, so VM can genrate error dump when an exception occurred in non-
- // Java thread (e.g. VM thread).
- __try {
- thread->run();
- } __except(topLevelExceptionFilter(
- (_EXCEPTION_POINTERS*)_exception_info())) {
- // Nothing to do.
- }
+ // Install a win32 structured exception handler around every thread created
+ // by VM, so VM can genrate error dump when an exception occurred in non-
+ // Java thread (e.g. VM thread).
+ __try {
+ thread->run();
+ } __except(topLevelExceptionFilter(
+ (_EXCEPTION_POINTERS*)_exception_info())) {
+ // Nothing to do.
}
// One less thread is executing
@@ -2489,16 +2473,6 @@
}
#endif
-#ifdef _WIN64
- // Windows will sometimes generate an access violation
- // when we call malloc. Since we use VectoredExceptions
- // on 64 bit platforms, we see this exception. We must
- // pass this exception on so Windows can recover.
- // We check to see if the pc of the fault is in NTDLL.DLL
- // if so, we pass control on to Windows for handling.
- if (UseVectoredExceptions && _addr_in_ntdll(pc)) return EXCEPTION_CONTINUE_SEARCH;
-#endif
-
// Stack overflow or null pointer exception in native code.
report_error(t, exception_code, pc, exceptionInfo->ExceptionRecord,
exceptionInfo->ContextRecord);
@@ -2527,30 +2501,8 @@
}
if (exception_code != EXCEPTION_BREAKPOINT) {
-#ifndef _WIN64
report_error(t, exception_code, pc, exceptionInfo->ExceptionRecord,
exceptionInfo->ContextRecord);
-#else
- // Itanium Windows uses a VectoredExceptionHandler
- // Which means that C++ programatic exception handlers (try/except)
- // will get here. Continue the search for the right except block if
- // the exception code is not a fatal code.
- switch ( exception_code ) {
- case EXCEPTION_ACCESS_VIOLATION:
- case EXCEPTION_STACK_OVERFLOW:
- case EXCEPTION_ILLEGAL_INSTRUCTION:
- case EXCEPTION_ILLEGAL_INSTRUCTION_2:
- case EXCEPTION_INT_OVERFLOW:
- case EXCEPTION_INT_DIVIDE_BY_ZERO:
- case EXCEPTION_UNCAUGHT_CXX_EXCEPTION:
- { report_error(t, exception_code, pc, exceptionInfo->ExceptionRecord,
- exceptionInfo->ContextRecord);
- }
- break;
- default:
- break;
- }
-#endif
}
return EXCEPTION_CONTINUE_SEARCH;
}
@@ -3706,18 +3658,6 @@
// Setup Windows Exceptions
- // On Itanium systems, Structured Exception Handling does not
- // work since stack frames must be walkable by the OS. Since
- // much of our code is dynamically generated, and we do not have
- // proper unwind .xdata sections, the system simply exits
- // rather than delivering the exception. To work around
- // this we use VectorExceptions instead.
-#ifdef _WIN64
- if (UseVectoredExceptions) {
- topLevelVectoredExceptionHandler = AddVectoredExceptionHandler( 1, topLevelExceptionFilter);
- }
-#endif
-
// for debugging float code generation bugs
if (ForceFloatExceptions) {
#ifndef _WIN64
--- a/hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp Mon Oct 22 12:01:35 2012 -0400
+++ b/hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp Thu Oct 25 16:33:15 2012 -0400
@@ -48,7 +48,5 @@
// Used on 64 bit platforms for UseCompressedOops base address or CDS
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
-// Only used on 64 bit Windows platforms
-define_pd_global(bool, UseVectoredExceptions, false);
#endif // OS_CPU_BSD_X86_VM_GLOBALS_BSD_X86_HPP
--- a/hotspot/src/os_cpu/bsd_zero/vm/globals_bsd_zero.hpp Mon Oct 22 12:01:35 2012 -0400
+++ b/hotspot/src/os_cpu/bsd_zero/vm/globals_bsd_zero.hpp Thu Oct 25 16:33:15 2012 -0400
@@ -41,7 +41,6 @@
define_pd_global(intx, CompilerThreadStackSize, 0);
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
-define_pd_global(bool, UseVectoredExceptions, false);
// Used on 64 bit platforms for UseCompressedOops base address or CDS
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
--- a/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp Mon Oct 22 12:01:35 2012 -0400
+++ b/hotspot/src/os_cpu/linux_sparc/vm/globals_linux_sparc.hpp Thu Oct 25 16:33:15 2012 -0400
@@ -35,7 +35,5 @@
// Used on 64 bit platforms for UseCompressedOops base address or CDS
define_pd_global(uintx, HeapBaseMinAddress, CONST64(4)*G);
-// Only used on 64 bit Windows platforms
-define_pd_global(bool, UseVectoredExceptions, false);
#endif // OS_CPU_LINUX_SPARC_VM_GLOBALS_LINUX_SPARC_HPP
--- a/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp Mon Oct 22 12:01:35 2012 -0400
+++ b/hotspot/src/os_cpu/linux_x86/vm/globals_linux_x86.hpp Thu Oct 25 16:33:15 2012 -0400
@@ -46,7 +46,5 @@
// Used on 64 bit platforms for UseCompressedOops base address or CDS
define_pd_global(uintx,HeapBaseMinAddress, 2*G);
-// Only used on 64 bit Windows platforms
-define_pd_global(bool, UseVectoredExceptions, false);
#endif // OS_CPU_LINUX_X86_VM_GLOBALS_LINUX_X86_HPP
--- a/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp Mon Oct 22 12:01:35 2012 -0400
+++ b/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp Thu Oct 25 16:33:15 2012 -0400
@@ -41,7 +41,6 @@
define_pd_global(intx, CompilerThreadStackSize, 0);
define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
-define_pd_global(bool, UseVectoredExceptions, false);
// Used on 64 bit platforms for UseCompressedOops base address or CDS
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
--- a/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp Mon Oct 22 12:01:35 2012 -0400
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/globals_solaris_sparc.hpp Thu Oct 25 16:33:15 2012 -0400
@@ -39,8 +39,6 @@
#else
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
#endif
-// Only used on 64 bit Windows platforms
-define_pd_global(bool, UseVectoredExceptions, false);
--- a/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp Mon Oct 22 12:01:35 2012 -0400
+++ b/hotspot/src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp Thu Oct 25 16:33:15 2012 -0400
@@ -45,7 +45,5 @@
// Used on 64 bit platforms for UseCompressedOops base address or CDS
define_pd_global(uintx,HeapBaseMinAddress, 256*M);
-// Only used on 64 bit Windows platforms
-define_pd_global(bool, UseVectoredExceptions, false);
#endif // OS_CPU_SOLARIS_X86_VM_GLOBALS_SOLARIS_X86_HPP
--- a/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp Mon Oct 22 12:01:35 2012 -0400
+++ b/hotspot/src/os_cpu/windows_x86/vm/globals_windows_x86.hpp Thu Oct 25 16:33:15 2012 -0400
@@ -47,7 +47,5 @@
// Used on 64 bit platforms for UseCompressedOops base address or CDS
define_pd_global(uintx, HeapBaseMinAddress, 2*G);
-// Only used on 64 bit Windows platforms
-define_pd_global(bool, UseVectoredExceptions, false);
#endif // OS_CPU_WINDOWS_X86_VM_GLOBALS_WINDOWS_X86_HPP
--- a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp Mon Oct 22 12:01:35 2012 -0400
+++ b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp Thu Oct 25 16:33:15 2012 -0400
@@ -175,9 +175,6 @@
PRUNTIME_FUNCTION prt;
PUNWIND_INFO_EH_ONLY punwind;
- // If we are using Vectored Exceptions we don't need this registration
- if (UseVectoredExceptions) return true;
-
BufferBlob* blob = BufferBlob::create("CodeCache Exception Handler", sizeof(DynamicCodeData));
CodeBuffer cb(blob);
MacroAssembler* masm = new MacroAssembler(&cb);
--- a/hotspot/src/share/vm/runtime/arguments.cpp Mon Oct 22 12:01:35 2012 -0400
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Thu Oct 25 16:33:15 2012 -0400
@@ -257,6 +257,7 @@
{ "MaxPermHeapExpansion", JDK_Version::jdk(8), JDK_Version::jdk(9) },
{ "CMSRevisitStackSize", JDK_Version::jdk(8), JDK_Version::jdk(9) },
{ "PrintRevisitStats", JDK_Version::jdk(8), JDK_Version::jdk(9) },
+ { "UseVectoredExceptions", JDK_Version::jdk(8), JDK_Version::jdk(9) },
#ifdef PRODUCT
{ "DesiredMethodLimit",
JDK_Version::jdk_update(7, 2), JDK_Version::jdk(8) },
--- a/hotspot/src/share/vm/runtime/globals.hpp Mon Oct 22 12:01:35 2012 -0400
+++ b/hotspot/src/share/vm/runtime/globals.hpp Thu Oct 25 16:33:15 2012 -0400
@@ -851,9 +851,6 @@
develop(bool, BreakAtWarning, false, \
"Execute breakpoint upon encountering VM warning") \
\
- product_pd(bool, UseVectoredExceptions, \
- "Temp Flag - Use Vectored Exceptions rather than SEH (Windows Only)") \
- \
develop(bool, TraceVMOperation, false, \
"Trace vm operations") \
\