mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8266490: Extend the OSContainer API to support the pids controller of cgroups
Reviewed-by: sgehwolf, lucy
This commit is contained in:
parent
2384e12888
commit
089e83bf1b
22 changed files with 527 additions and 79 deletions
|
@ -2238,6 +2238,7 @@ void os::Linux::print_uptime_info(outputStream* st) {
|
|||
|
||||
bool os::Linux::print_container_info(outputStream* st) {
|
||||
if (!OSContainer::is_containerized()) {
|
||||
st->print_cr("container information not found.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2326,6 +2327,14 @@ bool os::Linux::print_container_info(outputStream* st) {
|
|||
st->print_cr("%s", j == OSCONTAINER_ERROR ? "not supported" : "unlimited");
|
||||
}
|
||||
|
||||
j = OSContainer::OSContainer::pids_max();
|
||||
st->print("maximum number of tasks: ");
|
||||
if (j > 0) {
|
||||
st->print_cr(JLONG_FORMAT, j);
|
||||
} else {
|
||||
st->print_cr("%s", j == OSCONTAINER_ERROR ? "not supported" : "unlimited");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue