Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/parNew/parNewGeneration.cpp @ 997:46b819ba120b
Merge
author | jrose |
---|---|
date | Wed, 30 Sep 2009 13:25:39 -0700 |
parents | 148e5441d916 |
children | e018e6884bd8 |
comparison
equal
deleted
inserted
replaced
981:1af62b6ca0f9 | 997:46b819ba120b |
---|---|
478 ParScanThreadState& par_scan_state = _state_set->thread_sate(i); | 478 ParScanThreadState& par_scan_state = _state_set->thread_sate(i); |
479 par_scan_state.set_young_old_boundary(_young_old_boundary); | 479 par_scan_state.set_young_old_boundary(_young_old_boundary); |
480 | 480 |
481 par_scan_state.start_strong_roots(); | 481 par_scan_state.start_strong_roots(); |
482 gch->gen_process_strong_roots(_gen->level(), | 482 gch->gen_process_strong_roots(_gen->level(), |
483 true, // Process younger gens, if any, | 483 true, // Process younger gens, if any, |
484 // as strong roots. | 484 // as strong roots. |
485 false,// not collecting perm generation. | 485 false, // no scope; this is parallel code |
486 false, // not collecting perm generation. | |
486 SharedHeap::SO_AllClasses, | 487 SharedHeap::SO_AllClasses, |
487 &par_scan_state.older_gen_closure(), | 488 &par_scan_state.to_space_root_closure(), |
488 &par_scan_state.to_space_root_closure()); | 489 true, // walk *all* scavengable nmethods |
490 &par_scan_state.older_gen_closure()); | |
489 par_scan_state.end_strong_roots(); | 491 par_scan_state.end_strong_roots(); |
490 | 492 |
491 // "evacuate followers". | 493 // "evacuate followers". |
492 par_scan_state.evacuate_followers_closure().do_void(); | 494 par_scan_state.evacuate_followers_closure().do_void(); |
493 } | 495 } |
797 _overflow_stacks, desired_plab_sz(), _term); | 799 _overflow_stacks, desired_plab_sz(), _term); |
798 | 800 |
799 ParNewGenTask tsk(this, _next_gen, reserved().end(), &thread_state_set); | 801 ParNewGenTask tsk(this, _next_gen, reserved().end(), &thread_state_set); |
800 int n_workers = workers->total_workers(); | 802 int n_workers = workers->total_workers(); |
801 gch->set_par_threads(n_workers); | 803 gch->set_par_threads(n_workers); |
802 gch->change_strong_roots_parity(); | |
803 gch->rem_set()->prepare_for_younger_refs_iterate(true); | 804 gch->rem_set()->prepare_for_younger_refs_iterate(true); |
804 // It turns out that even when we're using 1 thread, doing the work in a | 805 // It turns out that even when we're using 1 thread, doing the work in a |
805 // separate thread causes wide variance in run times. We can't help this | 806 // separate thread causes wide variance in run times. We can't help this |
806 // in the multi-threaded case, but we special-case n=1 here to get | 807 // in the multi-threaded case, but we special-case n=1 here to get |
807 // repeatable measurements of the 1-thread overhead of the parallel code. | 808 // repeatable measurements of the 1-thread overhead of the parallel code. |
808 if (n_workers > 1) { | 809 if (n_workers > 1) { |
810 GenCollectedHeap::StrongRootsScope srs(gch); | |
809 workers->run_task(&tsk); | 811 workers->run_task(&tsk); |
810 } else { | 812 } else { |
813 GenCollectedHeap::StrongRootsScope srs(gch); | |
811 tsk.work(0); | 814 tsk.work(0); |
812 } | 815 } |
813 thread_state_set.reset(); | 816 thread_state_set.reset(); |
814 | 817 |
815 if (PAR_STATS_ENABLED && ParallelGCVerbose) { | 818 if (PAR_STATS_ENABLED && ParallelGCVerbose) { |