From 42e578e5ccdcd8522529aca4e72c968698abea76 Mon Sep 17 00:00:00 2001 From: Abhijit Saha Date: Fri, 28 Aug 2009 08:54:28 -0700 Subject: [PATCH 1/2] 6821003: Update hotspot windows os_win32 for windows 7 Reviewed-by: xlu --- hotspot/src/os/windows/vm/os_windows.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/hotspot/src/os/windows/vm/os_windows.cpp b/hotspot/src/os/windows/vm/os_windows.cpp index 9f90cf2b428..0c941d66db9 100644 --- a/hotspot/src/os/windows/vm/os_windows.cpp +++ b/hotspot/src/os/windows/vm/os_windows.cpp @@ -1526,7 +1526,8 @@ void os::print_os_info(outputStream* st) { case 5000: st->print(" Windows 2000"); break; case 5001: st->print(" Windows XP"); break; case 5002: - case 6000: { + case 6000: + case 6001: { // Retrieve SYSTEM_INFO from GetNativeSystemInfo call so that we could // find out whether we are running on 64 bit processor or not. SYSTEM_INFO si; @@ -1549,13 +1550,27 @@ void os::print_os_info(outputStream* st) { st->print(" Windows XP x64 Edition"); else st->print(" Windows Server 2003 family"); - } else { // os_vers == 6000 + } else if (os_vers == 6000) { if (osvi.wProductType == VER_NT_WORKSTATION) st->print(" Windows Vista"); else st->print(" Windows Server 2008"); if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) st->print(" , 64 bit"); + } else if (os_vers == 6001) { + if (osvi.wProductType == VER_NT_WORKSTATION) { + st->print(" Windows 7"); + } else { + // Unrecognized windows, print out its major and minor versions + st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion); + } + if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) + st->print(" , 64 bit"); + } else { // future os + // Unrecognized windows, print out its major and minor versions + st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion); + if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) + st->print(" , 64 bit"); } break; } From 779247f1cbc1ac2af2003a52955266037f7afe98 Mon Sep 17 00:00:00 2001 From: "Daniel D. Daugherty" Date: Fri, 28 Aug 2009 12:25:46 -0600 Subject: [PATCH 2/2] 6875393: 2/3 JNI itable index cache is broken Add missing initialization of cache size. Reviewed-by: tbell --- hotspot/src/share/vm/oops/instanceKlass.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp index 7a2d3408747..441f1414e6c 100644 --- a/hotspot/src/share/vm/oops/instanceKlass.cpp +++ b/hotspot/src/share/vm/oops/instanceKlass.cpp @@ -1073,6 +1073,7 @@ void instanceKlass::set_cached_itable_index(size_t idnum, int index) { if (indices == NULL || (length = (size_t)indices[0]) <= idnum) { size_t size = MAX2(idnum+1, (size_t)idnum_allocated_count()); int* new_indices = NEW_C_HEAP_ARRAY(int, size+1); + new_indices[0] =(int)size; // array size held in the first element // Copy the existing entries, if any size_t i; for (i = 0; i < length; i++) {