1.1 --- a/src/os/solaris/vm/os_solaris.cpp Tue May 15 15:16:14 2012 -0700 1.2 +++ b/src/os/solaris/vm/os_solaris.cpp Thu May 10 15:44:19 2012 +0200 1.3 @@ -2242,61 +2242,44 @@ 1.4 return true; 1.5 } 1.6 1.7 +void os::print_os_info_brief(outputStream* st) { 1.8 + os::Solaris::print_distro_info(st); 1.9 + 1.10 + os::Posix::print_uname_info(st); 1.11 + 1.12 + os::Solaris::print_libversion_info(st); 1.13 +} 1.14 + 1.15 void os::print_os_info(outputStream* st) { 1.16 st->print("OS:"); 1.17 1.18 + os::Solaris::print_distro_info(st); 1.19 + 1.20 + os::Posix::print_uname_info(st); 1.21 + 1.22 + os::Solaris::print_libversion_info(st); 1.23 + 1.24 + os::Posix::print_rlimit_info(st); 1.25 + 1.26 + os::Posix::print_load_average(st); 1.27 +} 1.28 + 1.29 +void os::Solaris::print_distro_info(outputStream* st) { 1.30 if (!_print_ascii_file("/etc/release", st)) { 1.31 - st->print("Solaris"); 1.32 + st->print("Solaris"); 1.33 + } 1.34 + st->cr(); 1.35 +} 1.36 + 1.37 +void os::Solaris::print_libversion_info(outputStream* st) { 1.38 + if (os::Solaris::T2_libthread()) { 1.39 + st->print(" (T2 libthread)"); 1.40 + } 1.41 + else { 1.42 + st->print(" (T1 libthread)"); 1.43 } 1.44 st->cr(); 1.45 - 1.46 - // kernel 1.47 - st->print("uname:"); 1.48 - struct utsname name; 1.49 - uname(&name); 1.50 - st->print(name.sysname); st->print(" "); 1.51 - st->print(name.release); st->print(" "); 1.52 - st->print(name.version); st->print(" "); 1.53 - st->print(name.machine); 1.54 - 1.55 - // libthread 1.56 - if (os::Solaris::T2_libthread()) st->print(" (T2 libthread)"); 1.57 - else st->print(" (T1 libthread)"); 1.58 - st->cr(); 1.59 - 1.60 - // rlimit 1.61 - st->print("rlimit:"); 1.62 - struct rlimit rlim; 1.63 - 1.64 - st->print(" STACK "); 1.65 - getrlimit(RLIMIT_STACK, &rlim); 1.66 - if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); 1.67 - else st->print("%uk", rlim.rlim_cur >> 10); 1.68 - 1.69 - st->print(", CORE "); 1.70 - getrlimit(RLIMIT_CORE, &rlim); 1.71 - if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); 1.72 - else st->print("%uk", rlim.rlim_cur >> 10); 1.73 - 1.74 - st->print(", NOFILE "); 1.75 - getrlimit(RLIMIT_NOFILE, &rlim); 1.76 - if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); 1.77 - else st->print("%d", rlim.rlim_cur); 1.78 - 1.79 - st->print(", AS "); 1.80 - getrlimit(RLIMIT_AS, &rlim); 1.81 - if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); 1.82 - else st->print("%uk", rlim.rlim_cur >> 10); 1.83 - st->cr(); 1.84 - 1.85 - // load average 1.86 - st->print("load average:"); 1.87 - double loadavg[3]; 1.88 - os::loadavg(loadavg, 3); 1.89 - st->print("%0.02f %0.02f %0.02f", loadavg[0], loadavg[1], loadavg[2]); 1.90 - st->cr(); 1.91 -} 1.92 - 1.93 +} 1.94 1.95 static bool check_addr0(outputStream* st) { 1.96 jboolean status = false;