< prev index next >
src/share/vm/runtime/os.hpp
Print this page
rev 11623 : [mq]: fix-initial-active-processor-count
*** 233,248 ****
// number of CPUs
static int processor_count() {
return _processor_count;
}
! static void set_processor_count(int count) { _processor_count = count; }
// Returns the number of CPUs this process is currently allowed to run on.
// Note that on some OSes this can change dynamically.
static int active_processor_count();
// Bind processes to processors.
// This is a two step procedure:
// first you generate a distribution of processes to processors,
// then you bind processes according to that distribution.
// Compute a distribution for number of processes to processors.
--- 233,254 ----
// number of CPUs
static int processor_count() {
return _processor_count;
}
! static void set_processor_count(int count);
// Returns the number of CPUs this process is currently allowed to run on.
// Note that on some OSes this can change dynamically.
static int active_processor_count();
+ // At startup the number of active CPUs this process is allowed to run on.
+ // This value does not change dynamically. May be different to active_processor_count().
+ static int initial_active_processor_count() {
+ return _initial_active_processor_count;
+ }
+
// Bind processes to processors.
// This is a two step procedure:
// first you generate a distribution of processes to processors,
// then you bind processes according to that distribution.
// Compute a distribution for number of processes to processors.
*** 1012,1021 ****
--- 1018,1028 ----
protected:
static long _rand_seed; // seed for random number generator
static int _processor_count; // number of processors
+ static int _initial_active_processor_count; // number of active processors during initialization.
static char* format_boot_path(const char* format_string,
const char* home,
int home_len,
char fileSep,
< prev index next >