mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6719981: Update Hotspot Windows os_win32 for windows XP 64 bit and windows 2008
Reviewed-by: dholmes, kamg
This commit is contained in:
parent
74faacc945
commit
3da24841be
1 changed files with 68 additions and 34 deletions
|
@ -1447,6 +1447,10 @@ void os::print_dll_info(outputStream *st) {
|
||||||
enumerate_modules(pid, _print_module, (void *)st);
|
enumerate_modules(pid, _print_module, (void *)st);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// function pointer to Windows API "GetNativeSystemInfo".
|
||||||
|
typedef void (WINAPI *GetNativeSystemInfo_func_type)(LPSYSTEM_INFO);
|
||||||
|
static GetNativeSystemInfo_func_type _GetNativeSystemInfo;
|
||||||
|
|
||||||
void os::print_os_info(outputStream* st) {
|
void os::print_os_info(outputStream* st) {
|
||||||
st->print("OS:");
|
st->print("OS:");
|
||||||
|
|
||||||
|
@ -1460,15 +1464,46 @@ void os::print_os_info(outputStream* st) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int os_vers = osvi.dwMajorVersion * 1000 + osvi.dwMinorVersion;
|
int os_vers = osvi.dwMajorVersion * 1000 + osvi.dwMinorVersion;
|
||||||
|
|
||||||
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) {
|
if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) {
|
||||||
switch (os_vers) {
|
switch (os_vers) {
|
||||||
case 3051: st->print(" Windows NT 3.51"); break;
|
case 3051: st->print(" Windows NT 3.51"); break;
|
||||||
case 4000: st->print(" Windows NT 4.0"); break;
|
case 4000: st->print(" Windows NT 4.0"); break;
|
||||||
case 5000: st->print(" Windows 2000"); break;
|
case 5000: st->print(" Windows 2000"); break;
|
||||||
case 5001: st->print(" Windows XP"); break;
|
case 5001: st->print(" Windows XP"); break;
|
||||||
case 5002: st->print(" Windows Server 2003 family"); break;
|
case 5002:
|
||||||
case 6000: st->print(" Windows Vista"); break;
|
case 6000: {
|
||||||
|
// 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;
|
||||||
|
ZeroMemory(&si, sizeof(SYSTEM_INFO));
|
||||||
|
// Check to see if _GetNativeSystemInfo has been initialized.
|
||||||
|
if (_GetNativeSystemInfo == NULL) {
|
||||||
|
HMODULE hKernel32 = GetModuleHandle(TEXT("kernel32.dll"));
|
||||||
|
_GetNativeSystemInfo =
|
||||||
|
CAST_TO_FN_PTR(GetNativeSystemInfo_func_type,
|
||||||
|
GetProcAddress(hKernel32,
|
||||||
|
"GetNativeSystemInfo"));
|
||||||
|
if (_GetNativeSystemInfo == NULL)
|
||||||
|
GetSystemInfo(&si);
|
||||||
|
} else {
|
||||||
|
_GetNativeSystemInfo(&si);
|
||||||
|
}
|
||||||
|
if (os_vers == 5002) {
|
||||||
|
if (osvi.wProductType == VER_NT_WORKSTATION &&
|
||||||
|
si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
|
||||||
|
st->print(" Windows XP x64 Edition");
|
||||||
|
else
|
||||||
|
st->print(" Windows Server 2003 family");
|
||||||
|
} else { // 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");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: // future windows, print out its major and minor versions
|
default: // future windows, print out its major and minor versions
|
||||||
st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
|
st->print(" Windows NT %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
|
||||||
}
|
}
|
||||||
|
@ -1481,7 +1516,6 @@ void os::print_os_info(outputStream* st) {
|
||||||
st->print(" Windows %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
|
st->print(" Windows %d.%d", osvi.dwMajorVersion, osvi.dwMinorVersion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
st->print(" Build %d", osvi.dwBuildNumber);
|
st->print(" Build %d", osvi.dwBuildNumber);
|
||||||
st->print(" %s", osvi.szCSDVersion); // service pack
|
st->print(" %s", osvi.szCSDVersion); // service pack
|
||||||
st->cr();
|
st->cr();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue