Mercurial > hg > truffle
comparison src/share/vm/memory/genMarkSweep.cpp @ 10179:a08c80e9e1e5
8012687: Remove unused is_root checks and closures
Reviewed-by: tschatzl, jmasa
author | stefank |
---|---|
date | Mon, 22 Apr 2013 20:27:36 +0200 |
parents | b735136e0d82 |
children | 2f50bc369470 |
comparison
equal
deleted
inserted
replaced
10178:d391427ddc29 | 10179:a08c80e9e1e5 |
---|---|
280 trace("3"); | 280 trace("3"); |
281 | 281 |
282 // Need new claim bits for the pointer adjustment tracing. | 282 // Need new claim bits for the pointer adjustment tracing. |
283 ClassLoaderDataGraph::clear_claimed_marks(); | 283 ClassLoaderDataGraph::clear_claimed_marks(); |
284 | 284 |
285 // Because the two closures below are created statically, cannot | 285 // Because the closure below is created statically, we cannot |
286 // use OopsInGenClosure constructor which takes a generation, | 286 // use OopsInGenClosure constructor which takes a generation, |
287 // as the Universe has not been created when the static constructors | 287 // as the Universe has not been created when the static constructors |
288 // are run. | 288 // are run. |
289 adjust_root_pointer_closure.set_orig_generation(gch->get_gen(level)); | |
290 adjust_pointer_closure.set_orig_generation(gch->get_gen(level)); | 289 adjust_pointer_closure.set_orig_generation(gch->get_gen(level)); |
291 | 290 |
292 gch->gen_process_strong_roots(level, | 291 gch->gen_process_strong_roots(level, |
293 false, // Younger gens are not roots. | 292 false, // Younger gens are not roots. |
294 true, // activate StrongRootsScope | 293 true, // activate StrongRootsScope |
295 false, // not scavenging | 294 false, // not scavenging |
296 SharedHeap::SO_AllClasses, | 295 SharedHeap::SO_AllClasses, |
297 &adjust_root_pointer_closure, | 296 &adjust_pointer_closure, |
298 false, // do not walk code | 297 false, // do not walk code |
299 &adjust_root_pointer_closure, | 298 &adjust_pointer_closure, |
300 &adjust_klass_closure); | 299 &adjust_klass_closure); |
301 | 300 |
302 // Now adjust pointers in remaining weak roots. (All of which should | 301 // Now adjust pointers in remaining weak roots. (All of which should |
303 // have been cleared if they pointed to non-surviving objects.) | 302 // have been cleared if they pointed to non-surviving objects.) |
304 CodeBlobToOopClosure adjust_code_pointer_closure(&adjust_pointer_closure, | 303 CodeBlobToOopClosure adjust_code_pointer_closure(&adjust_pointer_closure, |
305 /*do_marking=*/ false); | 304 /*do_marking=*/ false); |
306 gch->gen_process_weak_roots(&adjust_root_pointer_closure, | 305 gch->gen_process_weak_roots(&adjust_pointer_closure, |
307 &adjust_code_pointer_closure, | 306 &adjust_code_pointer_closure); |
308 &adjust_pointer_closure); | |
309 | 307 |
310 adjust_marks(); | 308 adjust_marks(); |
311 GenAdjustPointersClosure blk; | 309 GenAdjustPointersClosure blk; |
312 gch->generation_iterate(&blk, true); | 310 gch->generation_iterate(&blk, true); |
313 } | 311 } |