31 #include "code/vtableStubs.hpp" |
31 #include "code/vtableStubs.hpp" |
32 #include "compiler/compileBroker.hpp" |
32 #include "compiler/compileBroker.hpp" |
33 #include "compiler/disassembler.hpp" |
33 #include "compiler/disassembler.hpp" |
34 #include "interpreter/interpreter.hpp" |
34 #include "interpreter/interpreter.hpp" |
35 #include "logging/log.hpp" |
35 #include "logging/log.hpp" |
|
36 #include "logging/logStream.hpp" |
36 #include "memory/allocation.inline.hpp" |
37 #include "memory/allocation.inline.hpp" |
37 #include "memory/filemap.hpp" |
38 #include "memory/filemap.hpp" |
38 #include "oops/oop.inline.hpp" |
39 #include "oops/oop.inline.hpp" |
39 #include "os_bsd.inline.hpp" |
40 #include "os_bsd.inline.hpp" |
40 #include "os_posix.inline.hpp" |
41 #include "os_posix.inline.hpp" |
741 log_info(os, thread)("Thread started (pthread id: " UINTX_FORMAT ", attributes: %s). ", |
742 log_info(os, thread)("Thread started (pthread id: " UINTX_FORMAT ", attributes: %s). ", |
742 (uintx) tid, os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr)); |
743 (uintx) tid, os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr)); |
743 } else { |
744 } else { |
744 log_warning(os, thread)("Failed to start thread - pthread_create failed (%s) for attributes: %s.", |
745 log_warning(os, thread)("Failed to start thread - pthread_create failed (%s) for attributes: %s.", |
745 os::errno_name(ret), os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr)); |
746 os::errno_name(ret), os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr)); |
|
747 // Log some OS information which might explain why creating the thread failed. |
|
748 log_info(os, thread)("Number of threads approx. running in the VM: %d", Threads::number_of_threads()); |
|
749 LogStream st(Log(os, thread)::info()); |
|
750 os::Posix::print_rlimit_info(&st); |
|
751 os::print_memory_info(&st); |
746 } |
752 } |
747 |
753 |
748 pthread_attr_destroy(&attr); |
754 pthread_attr_destroy(&attr); |
749 |
755 |
750 if (ret != 0) { |
756 if (ret != 0) { |