equal
deleted
inserted
replaced
787 if (ret == 0) { |
787 if (ret == 0) { |
788 log_info(os, thread)("Thread started (pthread id: " UINTX_FORMAT ", attributes: %s). ", |
788 log_info(os, thread)("Thread started (pthread id: " UINTX_FORMAT ", attributes: %s). ", |
789 (uintx) tid, os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr)); |
789 (uintx) tid, os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr)); |
790 } else { |
790 } else { |
791 log_warning(os, thread)("Failed to start thread - pthread_create failed (%s) for attributes: %s.", |
791 log_warning(os, thread)("Failed to start thread - pthread_create failed (%s) for attributes: %s.", |
792 strerror(ret), os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr)); |
792 os::errno_name(ret), os::Posix::describe_pthread_attr(buf, sizeof(buf), &attr)); |
793 } |
793 } |
794 |
794 |
795 pthread_attr_destroy(&attr); |
795 pthread_attr_destroy(&attr); |
796 |
796 |
797 if (ret != 0) { |
797 if (ret != 0) { |
1120 // from src/solaris/hpi/src/system_md.c |
1120 // from src/solaris/hpi/src/system_md.c |
1121 |
1121 |
1122 size_t os::lasterror(char *buf, size_t len) { |
1122 size_t os::lasterror(char *buf, size_t len) { |
1123 if (errno == 0) return 0; |
1123 if (errno == 0) return 0; |
1124 |
1124 |
1125 const char *s = ::strerror(errno); |
1125 const char *s = os::strerror(errno); |
1126 size_t n = ::strlen(s); |
1126 size_t n = ::strlen(s); |
1127 if (n >= len) { |
1127 if (n >= len) { |
1128 n = len - 1; |
1128 n = len - 1; |
1129 } |
1129 } |
1130 ::strncpy(buf, s, n); |
1130 ::strncpy(buf, s, n); |
2139 |
2139 |
2140 static void warn_fail_commit_memory(char* addr, size_t size, bool exec, |
2140 static void warn_fail_commit_memory(char* addr, size_t size, bool exec, |
2141 int err) { |
2141 int err) { |
2142 warning("INFO: os::commit_memory(" PTR_FORMAT ", " SIZE_FORMAT |
2142 warning("INFO: os::commit_memory(" PTR_FORMAT ", " SIZE_FORMAT |
2143 ", %d) failed; error='%s' (errno=%d)", addr, size, exec, |
2143 ", %d) failed; error='%s' (errno=%d)", addr, size, exec, |
2144 strerror(err), err); |
2144 os::errno_name(err), err); |
2145 } |
2145 } |
2146 |
2146 |
2147 // NOTE: Bsd kernel does not really reserve the pages for us. |
2147 // NOTE: Bsd kernel does not really reserve the pages for us. |
2148 // All it does is to check if there are enough free pages |
2148 // All it does is to check if there are enough free pages |
2149 // left at the time of mmap(). This could be a potential |
2149 // left at the time of mmap(). This could be a potential |
3420 |
3420 |
3421 ThreadCritical::initialize(); |
3421 ThreadCritical::initialize(); |
3422 |
3422 |
3423 Bsd::set_page_size(getpagesize()); |
3423 Bsd::set_page_size(getpagesize()); |
3424 if (Bsd::page_size() == -1) { |
3424 if (Bsd::page_size() == -1) { |
3425 fatal("os_bsd.cpp: os::init: sysconf failed (%s)", strerror(errno)); |
3425 fatal("os_bsd.cpp: os::init: sysconf failed (%s)", os::strerror(errno)); |
3426 } |
3426 } |
3427 init_page_sizes((size_t) Bsd::page_size()); |
3427 init_page_sizes((size_t) Bsd::page_size()); |
3428 |
3428 |
3429 Bsd::initialize_system_info(); |
3429 Bsd::initialize_system_info(); |
3430 |
3430 |