Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp @ 1840:4e0094bc41fa
6983311: G1: LoopTest hangs when run with -XX:+ExplicitInvokesConcurrent
Summary: Clear the concurrent marking "in progress" flag while the FullGCCount_lock is held. This avoids a race that can cause back to back System.gc() calls, when ExplicitGCInvokesConcurrent is enabled, to fail to initiate a marking cycle causing the requesting thread to hang.
Reviewed-by: tonyp, ysr
author | johnc |
---|---|
date | Fri, 01 Oct 2010 18:23:16 -0700 |
parents | c18cbe5936b8 |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1838:8f6f7587d292 | 1840:4e0094bc41fa |
---|---|
67 // Counting virtual time so far. | 67 // Counting virtual time so far. |
68 double vtime_count_accum() { return _vtime_count_accum; } | 68 double vtime_count_accum() { return _vtime_count_accum; } |
69 | 69 |
70 ConcurrentMark* cm() { return _cm; } | 70 ConcurrentMark* cm() { return _cm; } |
71 | 71 |
72 void set_started() { _started = true; } | 72 void set_started() { assert(!_in_progress, "cycle in progress"); _started = true; } |
73 void clear_started() { _started = false; } | 73 void clear_started() { assert(_in_progress, "must be starting a cycle"); _started = false; } |
74 bool started() { return _started; } | 74 bool started() { return _started; } |
75 | 75 |
76 void set_in_progress() { _in_progress = true; } | 76 void set_in_progress() { assert(_started, "must be starting a cycle"); _in_progress = true; } |
77 void clear_in_progress() { _in_progress = false; } | 77 void clear_in_progress() { assert(!_started, "must not be starting a new cycle"); _in_progress = false; } |
78 bool in_progress() { return _in_progress; } | 78 bool in_progress() { return _in_progress; } |
79 | 79 |
80 // This flag returns true from the moment a marking cycle is | 80 // This flag returns true from the moment a marking cycle is |
81 // initiated (during the initial-mark pause when started() is set) | 81 // initiated (during the initial-mark pause when started() is set) |
82 // to the moment when the cycle completes (just after the next | 82 // to the moment when the cycle completes (just after the next |