4006 fatal(err_msg("Could not enable polling page at " PTR_FORMAT, _polling_page)); |
4006 fatal(err_msg("Could not enable polling page at " PTR_FORMAT, _polling_page)); |
4007 } |
4007 } |
4008 }; |
4008 }; |
4009 |
4009 |
4010 int os::active_processor_count() { |
4010 int os::active_processor_count() { |
|
4011 // User has overridden the number of active processors |
|
4012 if (ActiveProcessorCount > 0) { |
|
4013 if (PrintActiveCpus) { |
|
4014 tty->print_cr("active_processor_count: " |
|
4015 "active processor count set by user : %d", |
|
4016 ActiveProcessorCount); |
|
4017 } |
|
4018 return ActiveProcessorCount; |
|
4019 } |
|
4020 |
4011 int online_cpus = ::sysconf(_SC_NPROCESSORS_ONLN); |
4021 int online_cpus = ::sysconf(_SC_NPROCESSORS_ONLN); |
4012 assert(online_cpus > 0 && online_cpus <= processor_count(), "sanity check"); |
4022 assert(online_cpus > 0 && online_cpus <= processor_count(), "sanity check"); |
4013 return online_cpus; |
4023 return online_cpus; |
4014 } |
4024 } |
4015 |
4025 |