9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_G1_G1COLLECTORSTATE_HPP
26 #define SHARE_VM_GC_G1_G1COLLECTORSTATE_HPP
27
28 #include "gc/g1/g1YCTypes.hpp"
29 #include "memory/allocation.hpp"
30 #include "utilities/globalDefinitions.hpp"
31
32 // Various state variables that indicate
33 // the phase of the G1 collection.
34 class G1CollectorState VALUE_OBJ_CLASS_SPEC {
35 // Indicates whether we are in "full young" or "mixed" GC mode.
36 bool _gcs_are_young;
37 // Was the last GC "young"?
38 bool _last_gc_was_young;
39 // Is this the "last young GC" before we start doing mixed GCs?
40 // Set after a concurrent mark has completed.
41 bool _last_young_gc;
42
43 // If initiate_conc_mark_if_possible() is set at the beginning of a
44 // pause, it is a suggestion that the pause should start a marking
45 // cycle by doing the initial-mark work. However, it is possible
46 // that the concurrent marking thread is still finishing up the
47 // previous marking cycle (e.g., clearing the next marking
48 // bitmap). If that is the case we cannot start a new cycle and
49 // we'll have to wait for the concurrent marking thread to finish
50 // what it is doing. In this case we will postpone the marking cycle
51 // initiation decision for the next pause. When we eventually decide
52 // to start a cycle, we will set _during_initial_mark_pause which
53 // will stay true until the end of the initial-mark pause and it's
54 // the condition that indicates that a pause is doing the
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_G1_G1COLLECTORSTATE_HPP
26 #define SHARE_VM_GC_G1_G1COLLECTORSTATE_HPP
27
28 #include "gc/g1/g1YCTypes.hpp"
29 #include "utilities/globalDefinitions.hpp"
30
31 // Various state variables that indicate
32 // the phase of the G1 collection.
33 class G1CollectorState {
34 // Indicates whether we are in "full young" or "mixed" GC mode.
35 bool _gcs_are_young;
36 // Was the last GC "young"?
37 bool _last_gc_was_young;
38 // Is this the "last young GC" before we start doing mixed GCs?
39 // Set after a concurrent mark has completed.
40 bool _last_young_gc;
41
42 // If initiate_conc_mark_if_possible() is set at the beginning of a
43 // pause, it is a suggestion that the pause should start a marking
44 // cycle by doing the initial-mark work. However, it is possible
45 // that the concurrent marking thread is still finishing up the
46 // previous marking cycle (e.g., clearing the next marking
47 // bitmap). If that is the case we cannot start a new cycle and
48 // we'll have to wait for the concurrent marking thread to finish
49 // what it is doing. In this case we will postpone the marking cycle
50 // initiation decision for the next pause. When we eventually decide
51 // to start a cycle, we will set _during_initial_mark_pause which
52 // will stay true until the end of the initial-mark pause and it's
53 // the condition that indicates that a pause is doing the
|