changeset 2562:bf6481e5f96d

7061225: os::print_cpu_info() should support os-specific data Reviewed-by: dholmes, never, jwilhelm, kvn
author jcoomes
date Wed, 06 Jul 2011 13:02:54 -0700
parents 48048b59a551
children 8a4fc2990229
files src/os/linux/vm/os_linux.cpp src/os/solaris/vm/os_solaris.cpp src/os/windows/vm/os_windows.cpp src/share/vm/runtime/os.cpp src/share/vm/runtime/os.hpp
diffstat 5 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/os/linux/vm/os_linux.cpp	Wed Jul 06 12:28:07 2011 -0700
+++ b/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/src/os/solaris/vm/os_solaris.cpp	Wed Jul 06 12:28:07 2011 -0700
+++ b/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/src/os/windows/vm/os_windows.cpp	Wed Jul 06 12:28:07 2011 -0700
+++ b/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/src/share/vm/runtime/os.cpp	Wed Jul 06 12:28:07 2011 -0700
+++ b/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/src/share/vm/runtime/os.hpp	Wed Jul 06 12:28:07 2011 -0700
+++ b/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);