os::is_server_class_machine() could return incorrect result if a host's cpu have a few logical cores.
For example if a host has 2 physical cores with 2 threads on each this host is not considered as server class machine despite https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/ergonomics.html#sthref5 says:
"2 or more physical processors."
The code :
const unsigned int logical_processors =
VM_Version::logical_processors_per_package();
if (logical_processors > 1) {
const unsigned int physical_packages =
os::active_processor_count() / logical_processors;
if (physical_packages > server_processors) {
result = true;
}
the line "if (physical_packages > server_processors)" should be "if (physical_packages >= server_processors)" to comply with description.
For example if a host has 2 physical cores with 2 threads on each this host is not considered as server class machine despite https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/ergonomics.html#sthref5 says:
"2 or more physical processors."
The code :
const unsigned int logical_processors =
VM_Version::logical_processors_per_package();
if (logical_processors > 1) {
const unsigned int physical_packages =
os::active_processor_count() / logical_processors;
if (physical_packages > server_processors) {
result = true;
}
the line "if (physical_packages > server_processors)" should be "if (physical_packages >= server_processors)" to comply with description.
- blocks
-
JDK-8148239 TestSelectDefaultGC.java incorrectly expects G1 on non-server class machines
-
- Resolved
-