Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp @ 4876:be649fefcdc2
7134655: Crash in reference processing when doing single-threaded remarking
Summary: Temporarily disabled multi-threaded reference discovery when entering a single-threaded remark phase.
Reviewed-by: brutisso, tonyp, jmasa, jcoomes
author | stefank |
---|---|
date | Fri, 27 Jan 2012 14:14:50 +0100 |
parents | 441e946dc1af |
children | d903bf750e9f |
comparison
equal
deleted
inserted
replaced
4839:b4ebad3520bb | 4876:be649fefcdc2 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
5592 // ST marking. | 5592 // ST marking. |
5593 ReferenceProcessorMTDiscoveryMutator mt(ref_processor(), true); | 5593 ReferenceProcessorMTDiscoveryMutator mt(ref_processor(), true); |
5594 GenCollectedHeap::StrongRootsScope srs(gch); | 5594 GenCollectedHeap::StrongRootsScope srs(gch); |
5595 workers->run_task(&tsk); | 5595 workers->run_task(&tsk); |
5596 } else { | 5596 } else { |
5597 ReferenceProcessorMTDiscoveryMutator mt(ref_processor(), false); | |
5597 GenCollectedHeap::StrongRootsScope srs(gch); | 5598 GenCollectedHeap::StrongRootsScope srs(gch); |
5598 tsk.work(0); | 5599 tsk.work(0); |
5599 } | 5600 } |
5600 gch->set_par_threads(0); // 0 ==> non-parallel. | 5601 gch->set_par_threads(0); // 0 ==> non-parallel. |
5601 // restore, single-threaded for now, any preserved marks | 5602 // restore, single-threaded for now, any preserved marks |
5606 // Non-parallel version of remark | 5607 // Non-parallel version of remark |
5607 void CMSCollector::do_remark_non_parallel() { | 5608 void CMSCollector::do_remark_non_parallel() { |
5608 ResourceMark rm; | 5609 ResourceMark rm; |
5609 HandleMark hm; | 5610 HandleMark hm; |
5610 GenCollectedHeap* gch = GenCollectedHeap::heap(); | 5611 GenCollectedHeap* gch = GenCollectedHeap::heap(); |
5612 ReferenceProcessorMTDiscoveryMutator mt(ref_processor(), false); | |
5613 | |
5611 MarkRefsIntoAndScanClosure | 5614 MarkRefsIntoAndScanClosure |
5612 mrias_cl(_span, ref_processor(), &_markBitMap, &_modUnionTable, | 5615 mrias_cl(_span, ref_processor(), &_markBitMap, &_modUnionTable, |
5613 &_markStack, &_revisitStack, this, | 5616 &_markStack, &_revisitStack, this, |
5614 false /* should_yield */, false /* not precleaning */); | 5617 false /* should_yield */, false /* not precleaning */); |
5615 MarkFromDirtyCardsClosure | 5618 MarkFromDirtyCardsClosure |