comparison src/share/vm/gc_implementation/g1/vm_operations_g1.cpp @ 2034:7e37af9d69ef

7011379: G1: overly long concurrent marking cycles Summary: This changeset introduces filtering of SATB buffers at the point when they are about to be enqueued. If this filtering clears enough entries on each buffer, the buffer can then be re-used and not enqueued. This cuts down the number of SATB buffers that need to be processed by the concurrent marking threads. Reviewed-by: johnc, ysr
author tonyp
date Wed, 19 Jan 2011 09:35:17 -0500
parents 631f79e71e90
children 1d1603768966
comparison
equal deleted inserted replaced
7:bcb31d7b4914 8:d502fa3db6cf
36 : VM_G1OperationWithAllocRequest(gc_count_before, word_size) { 36 : VM_G1OperationWithAllocRequest(gc_count_before, word_size) {
37 guarantee(word_size > 0, "an allocation should always be requested"); 37 guarantee(word_size > 0, "an allocation should always be requested");
38 } 38 }
39 39
40 void VM_G1CollectForAllocation::doit() { 40 void VM_G1CollectForAllocation::doit() {
41 JvmtiGCForAllocationMarker jgcm;
42 G1CollectedHeap* g1h = G1CollectedHeap::heap(); 41 G1CollectedHeap* g1h = G1CollectedHeap::heap();
43 _result = g1h->satisfy_failed_allocation(_word_size, &_pause_succeeded); 42 _result = g1h->satisfy_failed_allocation(_word_size, &_pause_succeeded);
44 assert(_result == NULL || _pause_succeeded, 43 assert(_result == NULL || _pause_succeeded,
45 "if we get back a result, the pause should have succeeded"); 44 "if we get back a result, the pause should have succeeded");
46 } 45 }
47 46
48 void VM_G1CollectFull::doit() { 47 void VM_G1CollectFull::doit() {
49 JvmtiGCFullMarker jgcm;
50 G1CollectedHeap* g1h = G1CollectedHeap::heap(); 48 G1CollectedHeap* g1h = G1CollectedHeap::heap();
51 GCCauseSetter x(g1h, _gc_cause); 49 GCCauseSetter x(g1h, _gc_cause);
52 g1h->do_full_collection(false /* clear_all_soft_refs */); 50 g1h->do_full_collection(false /* clear_all_soft_refs */);
53 } 51 }
54 52
70 "an incremental GC pause"); 68 "an incremental GC pause");
71 _gc_cause = gc_cause; 69 _gc_cause = gc_cause;
72 } 70 }
73 71
74 void VM_G1IncCollectionPause::doit() { 72 void VM_G1IncCollectionPause::doit() {
75 JvmtiGCForAllocationMarker jgcm;
76 G1CollectedHeap* g1h = G1CollectedHeap::heap(); 73 G1CollectedHeap* g1h = G1CollectedHeap::heap();
77 assert(!_should_initiate_conc_mark || 74 assert(!_should_initiate_conc_mark ||
78 ((_gc_cause == GCCause::_gc_locker && GCLockerInvokesConcurrent) || 75 ((_gc_cause == GCCause::_gc_locker && GCLockerInvokesConcurrent) ||
79 (_gc_cause == GCCause::_java_lang_system_gc && ExplicitGCInvokesConcurrent)), 76 (_gc_cause == GCCause::_java_lang_system_gc && ExplicitGCInvokesConcurrent)),
80 "only a GC locker or a System.gc() induced GC should start a cycle"); 77 "only a GC locker or a System.gc() induced GC should start a cycle");