Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/heapRegionSets.cpp @ 2361:1216415d8e35
7014923: G1: code cleanup
Summary: Some G1 code cleanup.
Reviewed-by: johnc, jcoomes, jwilhelm
author | tonyp |
---|---|
date | Fri, 04 Mar 2011 17:13:19 -0500 |
parents | 0fa27f37d4d4 |
children | e8b0b0392037 |
comparison
equal
deleted
inserted
replaced
2312:11303bede852 | 2361:1216415d8e35 |
---|---|
50 guarantee((SafepointSynchronize::is_at_safepoint() && | 50 guarantee((SafepointSynchronize::is_at_safepoint() && |
51 (Thread::current()->is_VM_thread() || | 51 (Thread::current()->is_VM_thread() || |
52 FreeList_lock->owned_by_self())) || | 52 FreeList_lock->owned_by_self())) || |
53 (!SafepointSynchronize::is_at_safepoint() && | 53 (!SafepointSynchronize::is_at_safepoint() && |
54 Heap_lock->owned_by_self()), | 54 Heap_lock->owned_by_self()), |
55 hrl_ext_msg(this, "master free list MT safety protocol")); | 55 hrs_ext_msg(this, "master free list MT safety protocol")); |
56 | 56 |
57 return FreeRegionList::check_mt_safety(); | 57 return FreeRegionList::check_mt_safety(); |
58 } | 58 } |
59 | 59 |
60 //////////////////// SecondaryFreeRegionList //////////////////// | 60 //////////////////// SecondaryFreeRegionList //////////////////// |
63 // Secondary Free List MT safety protocol: | 63 // Secondary Free List MT safety protocol: |
64 // Operations on the secondary free list should always be invoked | 64 // Operations on the secondary free list should always be invoked |
65 // while holding the SecondaryFreeList_lock. | 65 // while holding the SecondaryFreeList_lock. |
66 | 66 |
67 guarantee(SecondaryFreeList_lock->owned_by_self(), | 67 guarantee(SecondaryFreeList_lock->owned_by_self(), |
68 hrl_ext_msg(this, "secondary free list MT safety protocol")); | 68 hrs_ext_msg(this, "secondary free list MT safety protocol")); |
69 | 69 |
70 return FreeRegionList::check_mt_safety(); | 70 return FreeRegionList::check_mt_safety(); |
71 } | 71 } |
72 | 72 |
73 //////////////////// HumongousRegionSet //////////////////// | 73 //////////////////// HumongousRegionSet //////////////////// |
79 // The superclass will check that the region is not empty and | 79 // The superclass will check that the region is not empty and |
80 // humongous. | 80 // humongous. |
81 return HeapRegionSet::verify_region_extra(hr); | 81 return HeapRegionSet::verify_region_extra(hr); |
82 } | 82 } |
83 | 83 |
84 //////////////////// HumongousRegionSet //////////////////// | 84 //////////////////// MasterHumongousRegionSet //////////////////// |
85 | 85 |
86 bool MasterHumongousRegionSet::check_mt_safety() { | 86 bool MasterHumongousRegionSet::check_mt_safety() { |
87 // Master Humongous Set MT safety protocol: | 87 // Master Humongous Set MT safety protocol: |
88 // (a) If we're at a safepoint, operations on the master humongous | 88 // (a) If we're at a safepoint, operations on the master humongous |
89 // set should be invoked by either the VM thread (which will | 89 // set should be invoked by either the VM thread (which will |
95 guarantee((SafepointSynchronize::is_at_safepoint() && | 95 guarantee((SafepointSynchronize::is_at_safepoint() && |
96 (Thread::current()->is_VM_thread() || | 96 (Thread::current()->is_VM_thread() || |
97 OldSets_lock->owned_by_self())) || | 97 OldSets_lock->owned_by_self())) || |
98 (!SafepointSynchronize::is_at_safepoint() && | 98 (!SafepointSynchronize::is_at_safepoint() && |
99 Heap_lock->owned_by_self()), | 99 Heap_lock->owned_by_self()), |
100 hrl_ext_msg(this, "master humongous set MT safety protocol")); | 100 hrs_ext_msg(this, "master humongous set MT safety protocol")); |
101 return HumongousRegionSet::check_mt_safety(); | 101 return HumongousRegionSet::check_mt_safety(); |
102 } | 102 } |