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