< prev index next >

src/hotspot/os/windows/os_windows.cpp

Print this page




1592 void os::win32::print_uptime_info(outputStream* st) {
1593   unsigned long long ticks = GetTickCount64();
1594   os::print_dhm(st, "OS uptime:", ticks/1000);
1595 }
1596 
1597 void os::print_os_info(outputStream* st) {
1598 #ifdef ASSERT
1599   char buffer[1024];
1600   st->print("HostName: ");
1601   if (get_host_name(buffer, sizeof(buffer))) {
1602     st->print("%s ", buffer);
1603   } else {
1604     st->print("N/A ");
1605   }
1606 #endif
1607   st->print_cr("OS:");
1608   os::win32::print_windows_version(st);
1609 
1610   os::win32::print_uptime_info(st);
1611 
1612 #ifdef _LP64
1613   VM_Version::print_platform_virtualization_info(st);
1614 #endif
1615 }
1616 
1617 void os::win32::print_windows_version(outputStream* st) {
1618   OSVERSIONINFOEX osvi;
1619   VS_FIXEDFILEINFO *file_info;
1620   TCHAR kernel32_path[MAX_PATH];
1621   UINT len, ret;
1622 
1623   // Use the GetVersionEx information to see if we're on a server or
1624   // workstation edition of Windows. Starting with Windows 8.1 we can't
1625   // trust the OS version information returned by this API.
1626   ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
1627   osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
1628   if (!GetVersionEx((OSVERSIONINFO *)&osvi)) {
1629     st->print_cr("Call to GetVersionEx failed");
1630     return;
1631   }
1632   bool is_workstation = (osvi.wProductType == VER_NT_WORKSTATION);
1633 
1634   // Get the full path to \Windows\System32\kernel32.dll and use that for




1592 void os::win32::print_uptime_info(outputStream* st) {
1593   unsigned long long ticks = GetTickCount64();
1594   os::print_dhm(st, "OS uptime:", ticks/1000);
1595 }
1596 
1597 void os::print_os_info(outputStream* st) {
1598 #ifdef ASSERT
1599   char buffer[1024];
1600   st->print("HostName: ");
1601   if (get_host_name(buffer, sizeof(buffer))) {
1602     st->print("%s ", buffer);
1603   } else {
1604     st->print("N/A ");
1605   }
1606 #endif
1607   st->print_cr("OS:");
1608   os::win32::print_windows_version(st);
1609 
1610   os::win32::print_uptime_info(st);
1611 

1612   VM_Version::print_platform_virtualization_info(st);

1613 }
1614 
1615 void os::win32::print_windows_version(outputStream* st) {
1616   OSVERSIONINFOEX osvi;
1617   VS_FIXEDFILEINFO *file_info;
1618   TCHAR kernel32_path[MAX_PATH];
1619   UINT len, ret;
1620 
1621   // Use the GetVersionEx information to see if we're on a server or
1622   // workstation edition of Windows. Starting with Windows 8.1 we can't
1623   // trust the OS version information returned by this API.
1624   ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
1625   osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
1626   if (!GetVersionEx((OSVERSIONINFO *)&osvi)) {
1627     st->print_cr("Call to GetVersionEx failed");
1628     return;
1629   }
1630   bool is_workstation = (osvi.wProductType == VER_NT_WORKSTATION);
1631 
1632   // Get the full path to \Windows\System32\kernel32.dll and use that for


< prev index next >