src/share/vm/runtime/os.hpp

changeset 8661
27ae9bbef86a
parent 7780
5788dbd1f2d6
child 8856
ac27a9c85bea
child 9289
427b2fb1944f
child 9413
5aa3d728164a
equal deleted inserted replaced
8659:c70ebf41026a 8661:27ae9bbef86a
149 static void pd_free_memory(char *addr, size_t bytes, size_t alignment_hint); 149 static void pd_free_memory(char *addr, size_t bytes, size_t alignment_hint);
150 static void pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint); 150 static void pd_realign_memory(char *addr, size_t bytes, size_t alignment_hint);
151 151
152 static size_t page_size_for_region(size_t region_size, size_t min_pages, bool must_be_aligned); 152 static size_t page_size_for_region(size_t region_size, size_t min_pages, bool must_be_aligned);
153 153
154 static void initialize_initial_active_processor_count();
154 public: 155 public:
155 static void init(void); // Called before command line parsing 156 static void init(void); // Called before command line parsing
156 static void init_before_ergo(void); // Called after command line parsing 157 static void init_before_ergo(void); // Called after command line parsing
157 // before VM ergonomics processing. 158 // before VM ergonomics processing.
158 static jint init_2(void); // Called after command line parsing 159 static jint init_2(void); // Called after command line parsing
235 static void set_processor_count(int count) { _processor_count = count; } 236 static void set_processor_count(int count) { _processor_count = count; }
236 237
237 // Returns the number of CPUs this process is currently allowed to run on. 238 // Returns the number of CPUs this process is currently allowed to run on.
238 // Note that on some OSes this can change dynamically. 239 // Note that on some OSes this can change dynamically.
239 static int active_processor_count(); 240 static int active_processor_count();
241
242 // At startup the number of active CPUs this process is allowed to run on.
243 // This value does not change dynamically. May be different from active_processor_count().
244 static int initial_active_processor_count() {
245 assert(_initial_active_processor_count > 0, "Initial active processor count not set yet.");
246 return _initial_active_processor_count;
247 }
240 248
241 // Bind processes to processors. 249 // Bind processes to processors.
242 // This is a two step procedure: 250 // This is a two step procedure:
243 // first you generate a distribution of processes to processors, 251 // first you generate a distribution of processes to processors,
244 // then you bind processes according to that distribution. 252 // then you bind processes according to that distribution.
973 }; 981 };
974 #endif 982 #endif
975 983
976 984
977 protected: 985 protected:
978 static long _rand_seed; // seed for random number generator 986 static long _rand_seed; // seed for random number generator
979 static int _processor_count; // number of processors 987 static int _processor_count; // number of processors
988 static int _initial_active_processor_count; // number of active processors during initialization.
980 989
981 static char* format_boot_path(const char* format_string, 990 static char* format_boot_path(const char* format_string,
982 const char* home, 991 const char* home,
983 int home_len, 992 int home_len,
984 char fileSep, 993 char fileSep,

mercurial