diff -r c70ebf41026a -r 27ae9bbef86a src/share/vm/runtime/os.hpp --- a/src/share/vm/runtime/os.hpp Fri Dec 02 11:07:27 2016 +0100 +++ b/src/share/vm/runtime/os.hpp Thu Dec 15 19:48:32 2016 -0500 @@ -151,6 +151,7 @@ static size_t page_size_for_region(size_t region_size, size_t min_pages, bool must_be_aligned); + static void initialize_initial_active_processor_count(); public: static void init(void); // Called before command line parsing static void init_before_ergo(void); // Called after command line parsing @@ -238,6 +239,13 @@ // 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 from active_processor_count(). + static int initial_active_processor_count() { + assert(_initial_active_processor_count > 0, "Initial active processor count not set yet."); + return _initial_active_processor_count; + } + // Bind processes to processors. // This is a two step procedure: // first you generate a distribution of processes to processors, @@ -975,8 +983,9 @@ protected: - static long _rand_seed; // seed for random number generator - static int _processor_count; // number of processors + 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,