1587 return t1 - t2;
1588 }
1589
1590 void os::print_os_info_brief(outputStream* st) {
1591 os::print_os_info(st);
1592 }
1593
1594 void os::print_os_info(outputStream* st) {
1595 #ifdef ASSERT
1596 char buffer[1024];
1597 st->print("HostName: ");
1598 if (get_host_name(buffer, sizeof(buffer))) {
1599 st->print("%s ", buffer);
1600 } else {
1601 st->print("N/A ");
1602 }
1603 #endif
1604 st->print("OS:");
1605 os::win32::print_windows_version(st);
1606
1607 #ifdef _LP64
1608 VM_Version::print_platform_virtualization_info(st);
1609 #endif
1610 }
1611
1612 void os::win32::print_windows_version(outputStream* st) {
1613 OSVERSIONINFOEX osvi;
1614 VS_FIXEDFILEINFO *file_info;
1615 TCHAR kernel32_path[MAX_PATH];
1616 UINT len, ret;
1617
1618 // Use the GetVersionEx information to see if we're on a server or
1619 // workstation edition of Windows. Starting with Windows 8.1 we can't
1620 // trust the OS version information returned by this API.
1621 ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
1622 osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
1623 if (!GetVersionEx((OSVERSIONINFO *)&osvi)) {
1624 st->print_cr("Call to GetVersionEx failed");
1625 return;
1626 }
|
1587 return t1 - t2;
1588 }
1589
1590 void os::print_os_info_brief(outputStream* st) {
1591 os::print_os_info(st);
1592 }
1593
1594 void os::print_os_info(outputStream* st) {
1595 #ifdef ASSERT
1596 char buffer[1024];
1597 st->print("HostName: ");
1598 if (get_host_name(buffer, sizeof(buffer))) {
1599 st->print("%s ", buffer);
1600 } else {
1601 st->print("N/A ");
1602 }
1603 #endif
1604 st->print("OS:");
1605 os::win32::print_windows_version(st);
1606
1607 unsigned long long ticks = GetTickCount64();
1608 st->print_cr("OS uptime (in days): %.2lf", (double) ((double)ticks/(1000.0*60.0*60.0*24.0)));
1609
1610 #ifdef _LP64
1611 VM_Version::print_platform_virtualization_info(st);
1612 #endif
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 }
|