# HG changeset patch # User jcoomes # Date 1309982574 25200 # Node ID e99d9a03c0f5e6de4591c78a1386355caf5df034 # Parent 377345fb5fb5f53788e9441ab2c4390db26db07a 7061225: os::print_cpu_info() should support os-specific data Reviewed-by: dholmes, never, jwilhelm, kvn diff -r 377345fb5fb5 -r e99d9a03c0f5 hotspot/src/os/linux/vm/os_linux.cpp --- a/hotspot/src/os/linux/vm/os_linux.cpp Wed Jul 06 12:28:07 2011 -0700 +++ b/hotspot/src/os/linux/vm/os_linux.cpp Wed Jul 06 13:02:54 2011 -0700 @@ -2085,6 +2085,14 @@ st->cr(); } +void os::pd_print_cpu_info(outputStream* st) { + st->print("\n/proc/cpuinfo:\n"); + if (!_print_ascii_file("/proc/cpuinfo", st)) { + st->print(" "); + } + st->cr(); +} + void os::print_memory_info(outputStream* st) { st->print("Memory:"); diff -r 377345fb5fb5 -r e99d9a03c0f5 hotspot/src/os/solaris/vm/os_solaris.cpp --- a/hotspot/src/os/solaris/vm/os_solaris.cpp Wed Jul 06 12:28:07 2011 -0700 +++ b/hotspot/src/os/solaris/vm/os_solaris.cpp Wed Jul 06 13:02:54 2011 -0700 @@ -2317,6 +2317,10 @@ return status; } +void os::pd_print_cpu_info(outputStream* st) { + // Nothing to do for now. +} + void os::print_memory_info(outputStream* st) { st->print("Memory:"); st->print(" %dk page", os::vm_page_size()>>10); diff -r 377345fb5fb5 -r e99d9a03c0f5 hotspot/src/os/windows/vm/os_windows.cpp --- a/hotspot/src/os/windows/vm/os_windows.cpp Wed Jul 06 12:28:07 2011 -0700 +++ b/hotspot/src/os/windows/vm/os_windows.cpp Wed Jul 06 13:02:54 2011 -0700 @@ -1720,6 +1720,10 @@ st->cr(); } +void os::pd_print_cpu_info(outputStream* st) { + // Nothing to do for now. +} + void os::print_memory_info(outputStream* st) { st->print("Memory:"); st->print(" %dk page", os::vm_page_size()>>10); diff -r 377345fb5fb5 -r e99d9a03c0f5 hotspot/src/share/vm/runtime/os.cpp --- a/hotspot/src/share/vm/runtime/os.cpp Wed Jul 06 12:28:07 2011 -0700 +++ b/hotspot/src/share/vm/runtime/os.cpp Wed Jul 06 13:02:54 2011 -0700 @@ -761,6 +761,7 @@ // st->print("(active %d)", os::active_processor_count()); st->print(" %s", VM_Version::cpu_features()); st->cr(); + pd_print_cpu_info(st); } void os::print_date_and_time(outputStream *st) { diff -r 377345fb5fb5 -r e99d9a03c0f5 hotspot/src/share/vm/runtime/os.hpp --- a/hotspot/src/share/vm/runtime/os.hpp Wed Jul 06 12:28:07 2011 -0700 +++ b/hotspot/src/share/vm/runtime/os.hpp Wed Jul 06 13:02:54 2011 -0700 @@ -480,6 +480,7 @@ // Output format may be different on different platforms. static void print_os_info(outputStream* st); static void print_cpu_info(outputStream* st); + static void pd_print_cpu_info(outputStream* st); static void print_memory_info(outputStream* st); static void print_dll_info(outputStream* st); static void print_environment_variables(outputStream* st, const char** env_list, char* buffer, int len);