6935821: G1: threads created during marking do not active their SATB queues

Newly-created threads always had the active field of their SATB queue initialized to false, even if they were created during marking. As a result, updates from threads created during a marking cycle were never enqueued and never processed. The fix includes remaining a method from active() to is_active() for readability and naming consistency.

Reviewed-by: ysr, johnc
This commit is contained in:
Antonios Printezis 2010-03-18 12:14:59 -04:00
parent 531591c2b9
commit 35f23f97b0
6 changed files with 82 additions and 17 deletions

View file

@ -62,7 +62,7 @@ protected:
public:
// Initialize this queue to contain a null buffer, and be part of the
// given PtrQueueSet.
PtrQueue(PtrQueueSet*, bool perm = false);
PtrQueue(PtrQueueSet*, bool perm = false, bool active = false);
// Release any contained resources.
void flush();
// Calls flush() when destroyed.
@ -101,6 +101,8 @@ public:
}
}
bool is_active() { return _active; }
static int byte_index_to_index(int ind) {
assert((ind % oopSize) == 0, "Invariant.");
return ind / oopSize;
@ -257,7 +259,7 @@ public:
bool process_completed_buffers() { return _process_completed; }
void set_process_completed(bool x) { _process_completed = x; }
bool active() { return _all_active; }
bool is_active() { return _all_active; }
// Set the buffer size. Should be called before any "enqueue" operation
// can be called. And should only be called once.