Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp @ 340:ebeb6490b814
6722116: CMS: Incorrect overflow handling when using parallel concurrent marking
Summary: Fixed CMSConcMarkingTask::reset() to store the restart address upon a marking stack overflow and to use it as the base, suitably aligned, for restarting the scan in CMSConcMarkingTask::do_scan_and_mark().
Reviewed-by: jcoomes, tonyp
author | ysr |
---|---|
date | Tue, 26 Aug 2008 14:54:48 -0700 |
parents | 850fdf70db2b |
children | 5d254928c888 |
comparison
equal
deleted
inserted
replaced
301:387a62b4be60 | 340:ebeb6490b814 |
---|---|
2788 initialize_sequential_subtasks_for_rescan(int n_threads) { | 2788 initialize_sequential_subtasks_for_rescan(int n_threads) { |
2789 // The "size" of each task is fixed according to rescan_task_size. | 2789 // The "size" of each task is fixed according to rescan_task_size. |
2790 assert(n_threads > 0, "Unexpected n_threads argument"); | 2790 assert(n_threads > 0, "Unexpected n_threads argument"); |
2791 const size_t task_size = rescan_task_size(); | 2791 const size_t task_size = rescan_task_size(); |
2792 size_t n_tasks = (used_region().word_size() + task_size - 1)/task_size; | 2792 size_t n_tasks = (used_region().word_size() + task_size - 1)/task_size; |
2793 assert((used_region().start() + (n_tasks - 1)*task_size < | 2793 assert((n_tasks == 0) == used_region().is_empty(), "n_tasks incorrect"); |
2794 used_region().end()) && | 2794 assert(n_tasks == 0 || |
2795 (used_region().start() + n_tasks*task_size >= | 2795 ((used_region().start() + (n_tasks - 1)*task_size < used_region().end()) && |
2796 used_region().end()), "n_task calculation incorrect"); | 2796 (used_region().start() + n_tasks*task_size >= used_region().end())), |
2797 "n_tasks calculation incorrect"); | |
2797 SequentialSubTasksDone* pst = conc_par_seq_tasks(); | 2798 SequentialSubTasksDone* pst = conc_par_seq_tasks(); |
2798 assert(!pst->valid(), "Clobbering existing data?"); | 2799 assert(!pst->valid(), "Clobbering existing data?"); |
2799 pst->set_par_threads(n_threads); | 2800 pst->set_par_threads(n_threads); |
2800 pst->set_n_tasks((int)n_tasks); | 2801 pst->set_n_tasks((int)n_tasks); |
2801 } | 2802 } |
2831 size_t n_tasks = (span.word_size() + task_size - 1)/task_size; | 2832 size_t n_tasks = (span.word_size() + task_size - 1)/task_size; |
2832 assert((n_tasks == 0) == span.is_empty(), "Inconsistency"); | 2833 assert((n_tasks == 0) == span.is_empty(), "Inconsistency"); |
2833 assert(n_tasks == 0 || | 2834 assert(n_tasks == 0 || |
2834 ((span.start() + (n_tasks - 1)*task_size < span.end()) && | 2835 ((span.start() + (n_tasks - 1)*task_size < span.end()) && |
2835 (span.start() + n_tasks*task_size >= span.end())), | 2836 (span.start() + n_tasks*task_size >= span.end())), |
2836 "n_task calculation incorrect"); | 2837 "n_tasks calculation incorrect"); |
2837 SequentialSubTasksDone* pst = conc_par_seq_tasks(); | 2838 SequentialSubTasksDone* pst = conc_par_seq_tasks(); |
2838 assert(!pst->valid(), "Clobbering existing data?"); | 2839 assert(!pst->valid(), "Clobbering existing data?"); |
2839 pst->set_par_threads(n_threads); | 2840 pst->set_par_threads(n_threads); |
2840 pst->set_n_tasks((int)n_tasks); | 2841 pst->set_n_tasks((int)n_tasks); |
2841 } | 2842 } |