comparison src/share/vm/gc_implementation/g1/vm_operations_g1.cpp @ 2125:7246a374a9f2

6458402: 3 jvmti tests fail with CMS and +ExplicitGCInvokesConcurrent Summary: Make JvmtiGCMark safe to run non-safepoint and instrument CMS Reviewed-by: ysr, dcubed
author kamg
date Mon, 10 Jan 2011 17:14:53 -0500
parents 631f79e71e90
children 1d1603768966
comparison
equal deleted inserted replaced
2124:e31d8c656c5b 2125:7246a374a9f2
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");