changeset 51117:6dfe5ae92fa8

8204598: add more thread-related system settings info to hs_error file on Linux Reviewed-by: dholmes, stuefe
author mbaesken
date Fri, 08 Jun 2018 14:14:44 +0200
parents f07979db6cb2
children 50469fb301c4
files src/hotspot/os/linux/os_linux.cpp src/hotspot/os/linux/os_linux.hpp
diffstat 2 files changed, 21 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/os/linux/os_linux.cpp	Mon Jun 11 14:16:43 2018 +0200
+++ b/src/hotspot/os/linux/os_linux.cpp	Fri Jun 08 14:14:44 2018 +0200
@@ -1988,6 +1988,8 @@
 
   os::Linux::print_full_memory_info(st);
 
+  os::Linux::print_proc_sys_info(st);
+
   os::Linux::print_container_info(st);
 }
 
@@ -2120,6 +2122,24 @@
   st->cr();
 }
 
+void os::Linux::print_proc_sys_info(outputStream* st) {
+  st->cr();
+  st->print_cr("/proc/sys/kernel/threads-max (system-wide limit on the number of threads):");
+  _print_ascii_file("/proc/sys/kernel/threads-max", st);
+  st->cr();
+  st->cr();
+
+  st->print_cr("/proc/sys/vm/max_map_count (maximum number of memory map areas a process may have):");
+  _print_ascii_file("/proc/sys/vm/max_map_count", st);
+  st->cr();
+  st->cr();
+
+  st->print_cr("/proc/sys/kernel/pid_max (system-wide limit on number of process identifiers):");
+  _print_ascii_file("/proc/sys/kernel/pid_max", st);
+  st->cr();
+  st->cr();
+}
+
 void os::Linux::print_full_memory_info(outputStream* st) {
   st->print("\n/proc/meminfo:\n");
   _print_ascii_file("/proc/meminfo", st);
--- a/src/hotspot/os/linux/os_linux.hpp	Mon Jun 11 14:16:43 2018 +0200
+++ b/src/hotspot/os/linux/os_linux.hpp	Fri Jun 08 14:14:44 2018 +0200
@@ -113,6 +113,7 @@
   static void print_container_info(outputStream* st);
   static void print_distro_info(outputStream* st);
   static void print_libversion_info(outputStream* st);
+  static void print_proc_sys_info(outputStream* st);
 
  public:
   static bool _stack_is_executable;