5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
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_IMPLEMENTATION_CONCURRENTMARKSWEEP_VMCMSOPERATIONS_HPP
26 #define SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_VMCMSOPERATIONS_HPP
27
28 #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
29 #include "gc_implementation/shared/vmGCOperations.hpp"
30 #include "gc_interface/gcCause.hpp"
31 #include "runtime/vm_operations.hpp"
32
33 // The VM_CMS_Operation is slightly different from
34 // a VM_GC_Operation -- and would not have subclassed easily
35 // to VM_GC_Operation without several changes to VM_GC_Operation.
36 // To minimize the changes, we have replicated some of the VM_GC_Operation
37 // functionality here. We will consolidate that back by doing subclassing
38 // as appropriate in Dolphin.
39 //
40 // VM_Operation
41 // VM_CMS_Operation
42 // - implements the common portion of work done in support
43 // of CMS' stop-world phases (initial mark and remark).
44 //
45 // VM_CMS_Initial_Mark
46 // VM_CMS_Final_Mark
47 //
48
49 // Forward decl.
50 class CMSCollector;
128 // VM operation to invoke a concurrent collection of the heap as a
129 // GenCollectedHeap heap.
130 class VM_GenCollectFullConcurrent: public VM_GC_Operation {
131 public:
132 VM_GenCollectFullConcurrent(uint gc_count_before,
133 uint full_gc_count_before,
134 GCCause::Cause gc_cause)
135 : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */)
136 {
137 assert(FullGCCount_lock != NULL, "Error");
138 assert(UseAsyncConcMarkSweepGC, "Else will hang caller");
139 }
140 ~VM_GenCollectFullConcurrent() {}
141 virtual VMOp_Type type() const { return VMOp_GenCollectFullConcurrent; }
142 virtual void doit();
143 virtual void doit_epilogue();
144 virtual bool is_cheap_allocated() const { return false; }
145 virtual bool evaluate_at_safepoint() const;
146 };
147
148 #endif // SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_VMCMSOPERATIONS_HPP
|
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
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_CMS_VMCMSOPERATIONS_HPP
26 #define SHARE_VM_GC_CMS_VMCMSOPERATIONS_HPP
27
28 #include "gc/cms/concurrentMarkSweepGeneration.hpp"
29 #include "gc/shared/gcCause.hpp"
30 #include "gc/shared/vmGCOperations.hpp"
31 #include "runtime/vm_operations.hpp"
32
33 // The VM_CMS_Operation is slightly different from
34 // a VM_GC_Operation -- and would not have subclassed easily
35 // to VM_GC_Operation without several changes to VM_GC_Operation.
36 // To minimize the changes, we have replicated some of the VM_GC_Operation
37 // functionality here. We will consolidate that back by doing subclassing
38 // as appropriate in Dolphin.
39 //
40 // VM_Operation
41 // VM_CMS_Operation
42 // - implements the common portion of work done in support
43 // of CMS' stop-world phases (initial mark and remark).
44 //
45 // VM_CMS_Initial_Mark
46 // VM_CMS_Final_Mark
47 //
48
49 // Forward decl.
50 class CMSCollector;
128 // VM operation to invoke a concurrent collection of the heap as a
129 // GenCollectedHeap heap.
130 class VM_GenCollectFullConcurrent: public VM_GC_Operation {
131 public:
132 VM_GenCollectFullConcurrent(uint gc_count_before,
133 uint full_gc_count_before,
134 GCCause::Cause gc_cause)
135 : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true /* full */)
136 {
137 assert(FullGCCount_lock != NULL, "Error");
138 assert(UseAsyncConcMarkSweepGC, "Else will hang caller");
139 }
140 ~VM_GenCollectFullConcurrent() {}
141 virtual VMOp_Type type() const { return VMOp_GenCollectFullConcurrent; }
142 virtual void doit();
143 virtual void doit_epilogue();
144 virtual bool is_cheap_allocated() const { return false; }
145 virtual bool evaluate_at_safepoint() const;
146 };
147
148 #endif // SHARE_VM_GC_CMS_VMCMSOPERATIONS_HPP
|