77
78 class TraceGen1TimeData : public CHeapObj<mtGC> {
79 private:
80 NumberSeq _all_full_gc_times;
81
82 public:
83 void record_full_collection(double full_gc_time_ms);
84 void print() const;
85 };
86
87 // There are three command line options related to the young gen size:
88 // NewSize, MaxNewSize and NewRatio (There is also -Xmn, but that is
89 // just a short form for NewSize==MaxNewSize). G1 will use its internal
90 // heuristics to calculate the actual young gen size, so these options
91 // basically only limit the range within which G1 can pick a young gen
92 // size. Also, these are general options taking byte sizes. G1 will
93 // internally work with a number of regions instead. So, some rounding
94 // will occur.
95 //
96 // If nothing related to the the young gen size is set on the command
97 // line we should allow the young gen to be between
98 // G1DefaultMinNewGenPercent and G1DefaultMaxNewGenPercent of the
99 // heap size. This means that every time the heap size changes the
100 // limits for the young gen size will be updated.
101 //
102 // If only -XX:NewSize is set we should use the specified value as the
103 // minimum size for young gen. Still using G1DefaultMaxNewGenPercent
104 // of the heap as maximum.
105 //
106 // If only -XX:MaxNewSize is set we should use the specified value as the
107 // maximum size for young gen. Still using G1DefaultMinNewGenPercent
108 // of the heap as minimum.
109 //
110 // If -XX:NewSize and -XX:MaxNewSize are both specified we use these values.
111 // No updates when the heap size changes. There is a special case when
112 // NewSize==MaxNewSize. This is interpreted as "fixed" and will use a
113 // different heuristic for calculating the collection set when we do mixed
114 // collection.
115 //
116 // If only -XX:NewRatio is set we should use the specified ratio of the heap
117 // as both min and max. This will be interpreted as "fixed" just like the
118 // NewSize==MaxNewSize case above. But we will update the min and max
119 // everytime the heap size changes.
120 //
121 // NewSize and MaxNewSize override NewRatio. So, NewRatio is ignored if it is
122 // combined with either NewSize or MaxNewSize. (A warning message is printed.)
123 class G1YoungGenSizer : public CHeapObj<mtGC> {
124 private:
125 enum SizerKind {
126 SizerDefaults,
127 SizerNewSizeOnly,
128 SizerMaxNewSizeOnly,
|
77
78 class TraceGen1TimeData : public CHeapObj<mtGC> {
79 private:
80 NumberSeq _all_full_gc_times;
81
82 public:
83 void record_full_collection(double full_gc_time_ms);
84 void print() const;
85 };
86
87 // There are three command line options related to the young gen size:
88 // NewSize, MaxNewSize and NewRatio (There is also -Xmn, but that is
89 // just a short form for NewSize==MaxNewSize). G1 will use its internal
90 // heuristics to calculate the actual young gen size, so these options
91 // basically only limit the range within which G1 can pick a young gen
92 // size. Also, these are general options taking byte sizes. G1 will
93 // internally work with a number of regions instead. So, some rounding
94 // will occur.
95 //
96 // If nothing related to the the young gen size is set on the command
97 // line we should allow the young gen to be between G1NewSizePercent
98 // and G1MaxNewSizePercent of the heap size. This means that every time
99 // the heap size changes, the limits for the young gen size will be
100 // recalculated.
101 //
102 // If only -XX:NewSize is set we should use the specified value as the
103 // minimum size for young gen. Still using G1MaxNewSizePercent of the
104 // heap as maximum.
105 //
106 // If only -XX:MaxNewSize is set we should use the specified value as the
107 // maximum size for young gen. Still using G1NewSizePercent of the heap
108 // as minimum.
109 //
110 // If -XX:NewSize and -XX:MaxNewSize are both specified we use these values.
111 // No updates when the heap size changes. There is a special case when
112 // NewSize==MaxNewSize. This is interpreted as "fixed" and will use a
113 // different heuristic for calculating the collection set when we do mixed
114 // collection.
115 //
116 // If only -XX:NewRatio is set we should use the specified ratio of the heap
117 // as both min and max. This will be interpreted as "fixed" just like the
118 // NewSize==MaxNewSize case above. But we will update the min and max
119 // everytime the heap size changes.
120 //
121 // NewSize and MaxNewSize override NewRatio. So, NewRatio is ignored if it is
122 // combined with either NewSize or MaxNewSize. (A warning message is printed.)
123 class G1YoungGenSizer : public CHeapObj<mtGC> {
124 private:
125 enum SizerKind {
126 SizerDefaults,
127 SizerNewSizeOnly,
128 SizerMaxNewSizeOnly,
|