src/share/vm/runtime/os.hpp

changeset 8946
e59c874298de
parent 8661
27ae9bbef86a
child 8856
ac27a9c85bea
child 9289
427b2fb1944f
child 9413
5aa3d728164a
     1.1 --- a/src/share/vm/runtime/os.hpp	Fri Oct 28 22:36:23 2016 +0000
     1.2 +++ b/src/share/vm/runtime/os.hpp	Thu Dec 15 19:48:32 2016 -0500
     1.3 @@ -151,6 +151,7 @@
     1.4  
     1.5    static size_t page_size_for_region(size_t region_size, size_t min_pages, bool must_be_aligned);
     1.6  
     1.7 +  static void initialize_initial_active_processor_count();
     1.8   public:
     1.9    static void init(void);                      // Called before command line parsing
    1.10    static void init_before_ergo(void);          // Called after command line parsing
    1.11 @@ -238,6 +239,13 @@
    1.12    // Note that on some OSes this can change dynamically.
    1.13    static int active_processor_count();
    1.14  
    1.15 +  // At startup the number of active CPUs this process is allowed to run on.
    1.16 +  // This value does not change dynamically. May be different from active_processor_count().
    1.17 +  static int initial_active_processor_count() {
    1.18 +    assert(_initial_active_processor_count > 0, "Initial active processor count not set yet.");
    1.19 +    return _initial_active_processor_count;
    1.20 +  }
    1.21 +
    1.22    // Bind processes to processors.
    1.23    //     This is a two step procedure:
    1.24    //     first you generate a distribution of processes to processors,
    1.25 @@ -975,8 +983,9 @@
    1.26  
    1.27  
    1.28   protected:
    1.29 -  static long _rand_seed;                   // seed for random number generator
    1.30 -  static int _processor_count;              // number of processors
    1.31 +  static long _rand_seed;                     // seed for random number generator
    1.32 +  static int _processor_count;                // number of processors
    1.33 +  static int _initial_active_processor_count; // number of active processors during initialization.
    1.34  
    1.35    static char* format_boot_path(const char* format_string,
    1.36                                  const char* home,

mercurial