src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp

changeset 3294
bca17e38de00
parent 2314
f95d63e2154a
child 3900
d2a62e0f25eb
     1.1 --- a/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp	Tue Nov 22 04:47:10 2011 -0500
     1.2 +++ b/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp	Tue Aug 09 10:16:01 2011 -0700
     1.3 @@ -187,6 +187,8 @@
     1.4    julong _young_gen_change_for_minor_throughput;
     1.5    julong _old_gen_change_for_major_throughput;
     1.6  
     1.7 +  static const uint GCWorkersPerJavaThread  = 2;
     1.8 +
     1.9    // Accessors
    1.10  
    1.11    double gc_pause_goal_sec() const { return _gc_pause_goal_sec; }
    1.12 @@ -331,6 +333,8 @@
    1.13    // Return true if the policy suggested a change.
    1.14    bool tenuring_threshold_change() const;
    1.15  
    1.16 +  static bool _debug_perturbation;
    1.17 +
    1.18   public:
    1.19    AdaptiveSizePolicy(size_t init_eden_size,
    1.20                       size_t init_promo_size,
    1.21 @@ -338,6 +342,31 @@
    1.22                       double gc_pause_goal_sec,
    1.23                       uint gc_cost_ratio);
    1.24  
    1.25 +  // Return number default  GC threads to use in the next GC.
    1.26 +  static int calc_default_active_workers(uintx total_workers,
    1.27 +                                         const uintx min_workers,
    1.28 +                                         uintx active_workers,
    1.29 +                                         uintx application_workers);
    1.30 +
    1.31 +  // Return number of GC threads to use in the next GC.
    1.32 +  // This is called sparingly so as not to change the
    1.33 +  // number of GC workers gratuitously.
    1.34 +  //   For ParNew collections
    1.35 +  //   For PS scavenge and ParOld collections
    1.36 +  //   For G1 evacuation pauses (subject to update)
    1.37 +  // Other collection phases inherit the number of
    1.38 +  // GC workers from the calls above.  For example,
    1.39 +  // a CMS parallel remark uses the same number of GC
    1.40 +  // workers as the most recent ParNew collection.
    1.41 +  static int calc_active_workers(uintx total_workers,
    1.42 +                                 uintx active_workers,
    1.43 +                                 uintx application_workers);
    1.44 +
    1.45 +  // Return number of GC threads to use in the next concurrent GC phase.
    1.46 +  static int calc_active_conc_workers(uintx total_workers,
    1.47 +                                      uintx active_workers,
    1.48 +                                      uintx application_workers);
    1.49 +
    1.50    bool is_gc_cms_adaptive_size_policy() {
    1.51      return kind() == _gc_cms_adaptive_size_policy;
    1.52    }

mercurial