8235671: enhance print_rlimit_info in os_posix

Reviewed-by: clanger, mdoerr
This commit is contained in:
Matthias Baesken 2019-12-10 16:55:14 +01:00
parent 83cb7044e9
commit 9a31ab8862

View File

@ -419,6 +419,10 @@ void os::Posix::print_rlimit_info(outputStream* st) {
#if defined(AIX)
st->print(", NPROC ");
st->print("%d", sysconf(_SC_CHILD_MAX));
st->print(", THREADS ");
getrlimit(RLIMIT_THREADS, &rlim);
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
else st->print(UINT64_FORMAT, uint64_t(rlim.rlim_cur));
#elif !defined(SOLARIS)
st->print(", NPROC ");
getrlimit(RLIMIT_NPROC, &rlim);
@ -436,6 +440,11 @@ void os::Posix::print_rlimit_info(outputStream* st) {
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
else st->print(UINT64_FORMAT "k", uint64_t(rlim.rlim_cur) / 1024);
st->print(", CPU ");
getrlimit(RLIMIT_CPU, &rlim);
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
else st->print(UINT64_FORMAT, uint64_t(rlim.rlim_cur));
st->print(", DATA ");
getrlimit(RLIMIT_DATA, &rlim);
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");