21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc_implementation/g1/concurrentMarkThread.inline.hpp"
27 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
28 #include "gc_implementation/g1/g1CollectorPolicy.hpp"
29 #include "gc_implementation/g1/g1Log.hpp"
30 #include "gc_implementation/g1/vm_operations_g1.hpp"
31 #include "gc_implementation/shared/gcTimer.hpp"
32 #include "gc_implementation/shared/gcTraceTime.hpp"
33 #include "gc_implementation/shared/isGCActiveMark.hpp"
34 #include "gc_implementation/g1/vm_operations_g1.hpp"
35 #include "runtime/interfaceSupport.hpp"
36
37 VM_G1CollectForAllocation::VM_G1CollectForAllocation(uint gc_count_before,
38 size_t word_size)
39 : VM_G1OperationWithAllocRequest(gc_count_before, word_size,
40 GCCause::_allocation_failure) {
41 guarantee(word_size > 0, "an allocation should always be requested");
42 }
43
44 void VM_G1CollectForAllocation::doit() {
45 G1CollectedHeap* g1h = G1CollectedHeap::heap();
46 GCCauseSetter x(g1h, _gc_cause);
47
48 _result = g1h->satisfy_failed_allocation(_word_size, allocation_context(), &_pause_succeeded);
49 assert(_result == NULL || _pause_succeeded,
50 "if we get back a result, the pause should have succeeded");
51 }
52
53 void VM_G1CollectFull::doit() {
54 G1CollectedHeap* g1h = G1CollectedHeap::heap();
55 GCCauseSetter x(g1h, _gc_cause);
56 g1h->do_full_collection(false /* clear_all_soft_refs */);
57 }
58
59 VM_G1IncCollectionPause::VM_G1IncCollectionPause(uint gc_count_before,
60 size_t word_size,
61 bool should_initiate_conc_mark,
|
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc_implementation/g1/concurrentMarkThread.inline.hpp"
27 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
28 #include "gc_implementation/g1/g1CollectorPolicy.hpp"
29 #include "gc_implementation/g1/g1Log.hpp"
30 #include "gc_implementation/g1/vm_operations_g1.hpp"
31 #include "gc_implementation/shared/gcTimer.hpp"
32 #include "gc_implementation/shared/gcTraceTime.hpp"
33 #include "gc_implementation/shared/isGCActiveMark.hpp"
34 #include "gc_implementation/g1/vm_operations_g1.hpp"
35 #include "runtime/interfaceSupport.hpp"
36
37 VM_G1CollectForAllocation::VM_G1CollectForAllocation(uint gc_count_before,
38 size_t word_size)
39 : VM_G1OperationWithAllocRequest(gc_count_before, word_size,
40 GCCause::_allocation_failure) {
41 guarantee(word_size != 0, "An allocation should always be requested with this operation.");
42 }
43
44 void VM_G1CollectForAllocation::doit() {
45 G1CollectedHeap* g1h = G1CollectedHeap::heap();
46 GCCauseSetter x(g1h, _gc_cause);
47
48 _result = g1h->satisfy_failed_allocation(_word_size, allocation_context(), &_pause_succeeded);
49 assert(_result == NULL || _pause_succeeded,
50 "if we get back a result, the pause should have succeeded");
51 }
52
53 void VM_G1CollectFull::doit() {
54 G1CollectedHeap* g1h = G1CollectedHeap::heap();
55 GCCauseSetter x(g1h, _gc_cause);
56 g1h->do_full_collection(false /* clear_all_soft_refs */);
57 }
58
59 VM_G1IncCollectionPause::VM_G1IncCollectionPause(uint gc_count_before,
60 size_t word_size,
61 bool should_initiate_conc_mark,
|