7061225: os::print_cpu_info() should support os-specific data
authorjcoomes
Wed, 06 Jul 2011 13:02:54 -0700
changeset 10023 e99d9a03c0f5
parent 10022 377345fb5fb5
child 10024 7f06e5a003ca
7061225: os::print_cpu_info() should support os-specific data Reviewed-by: dholmes, never, jwilhelm, kvn
hotspot/src/os/linux/vm/os_linux.cpp
hotspot/src/os/solaris/vm/os_solaris.cpp
hotspot/src/os/windows/vm/os_windows.cpp
hotspot/src/share/vm/runtime/os.cpp
hotspot/src/share/vm/runtime/os.hpp
--- 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("  <Not Available>");
+  }
+  st->cr();
+}
+
 void os::print_memory_info(outputStream* st) {
 
   st->print("Memory:");
--- 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);
--- 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);
--- 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) {
--- 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);