comparison src/share/vm/gc_implementation/g1/g1MarkSweep.cpp @ 10186:b06ac540229e

8013132: Add a flag to turn off the output of the verbose verification code Reviewed-by: johnc, brutisso
author stefank
date Wed, 24 Apr 2013 20:13:37 +0200
parents a08c80e9e1e5
children 2f50bc369470
comparison
equal deleted inserted replaced
10185:d50cc62e94ff 10186:b06ac540229e
168 "stack should be empty by now"); 168 "stack should be empty by now");
169 169
170 if (VerifyDuringGC) { 170 if (VerifyDuringGC) {
171 HandleMark hm; // handle scope 171 HandleMark hm; // handle scope
172 COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact); 172 COMPILER2_PRESENT(DerivedPointerTableDeactivate dpt_deact);
173 gclog_or_tty->print(" VerifyDuringGC:(full)[Verifying ");
174 Universe::heap()->prepare_for_verify(); 173 Universe::heap()->prepare_for_verify();
175 // Note: we can verify only the heap here. When an object is 174 // Note: we can verify only the heap here. When an object is
176 // marked, the previous value of the mark word (including 175 // marked, the previous value of the mark word (including
177 // identity hash values, ages, etc) is preserved, and the mark 176 // identity hash values, ages, etc) is preserved, and the mark
178 // word is set to markOop::marked_value - effectively removing 177 // word is set to markOop::marked_value - effectively removing
180 // used when verifying the dictionaries and so removing them 179 // used when verifying the dictionaries and so removing them
181 // from the mark word can make verification of the dictionaries 180 // from the mark word can make verification of the dictionaries
182 // fail. At the end of the GC, the orginal mark word values 181 // fail. At the end of the GC, the orginal mark word values
183 // (including hash values) are restored to the appropriate 182 // (including hash values) are restored to the appropriate
184 // objects. 183 // objects.
185 Universe::heap()->verify(/* silent */ false, 184 if (!VerifySilently) {
186 /* option */ VerifyOption_G1UseMarkWord); 185 gclog_or_tty->print(" VerifyDuringGC:(full)[Verifying ");
187 186 }
188 G1CollectedHeap* g1h = G1CollectedHeap::heap(); 187 Universe::heap()->verify(VerifySilently, VerifyOption_G1UseMarkWord);
189 gclog_or_tty->print_cr("]"); 188 if (!VerifySilently) {
189 gclog_or_tty->print_cr("]");
190 }
190 } 191 }
191 } 192 }
192 193
193 class G1PrepareCompactClosure: public HeapRegionClosure { 194 class G1PrepareCompactClosure: public HeapRegionClosure {
194 G1CollectedHeap* _g1h; 195 G1CollectedHeap* _g1h;