mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8146115: Improve docker container detection and resource configuration usage
Reviewed-by: dholmes, kbarrett, phh
This commit is contained in:
parent
2f84103a78
commit
20a8de0f70
15 changed files with 899 additions and 13 deletions
|
@ -290,6 +290,14 @@ void os::Solaris::initialize_system_info() {
|
|||
}
|
||||
|
||||
int os::active_processor_count() {
|
||||
// User has overridden the number of active processors
|
||||
if (ActiveProcessorCount > 0) {
|
||||
log_trace(os)("active_processor_count: "
|
||||
"active processor count set by user : %d",
|
||||
ActiveProcessorCount);
|
||||
return ActiveProcessorCount;
|
||||
}
|
||||
|
||||
int online_cpus = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
pid_t pid = getpid();
|
||||
psetid_t pset = PS_NONE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue