7095243: Disambiguate ReferenceProcessor::_discoveredSoftRefs

Add a new, separate, pointer to the base of the array of discovered reference lists and use this new pointer in places where we iterate over the entire array.

Reviewed-by: ysr, brutisso
This commit is contained in:
John Cuthbertson 2011-10-17 09:57:41 -07:00
parent 81bdd2ccc6
commit cab4072f8d
3 changed files with 27 additions and 18 deletions

View file

@ -255,7 +255,11 @@ class ReferenceProcessor : public CHeapObj {
int _num_q;
// The maximum MT'ness degree of the queues below
int _max_num_q;
// Arrays of lists of oops, one per thread
// Master array of discovered oops
DiscoveredList* _discovered_refs;
// Arrays of lists of oops, one per thread (pointers into master array above)
DiscoveredList* _discoveredSoftRefs;
DiscoveredList* _discoveredWeakRefs;
DiscoveredList* _discoveredFinalRefs;
@ -267,7 +271,8 @@ class ReferenceProcessor : public CHeapObj {
int num_q() { return _num_q; }
int max_num_q() { return _max_num_q; }
void set_active_mt_degree(int v) { _num_q = v; }
DiscoveredList* discovered_soft_refs() { return _discoveredSoftRefs; }
DiscoveredList* discovered_refs() { return _discovered_refs; }
ReferencePolicy* setup_policy(bool always_clear) {
_current_soft_ref_policy = always_clear ?
@ -411,6 +416,7 @@ class ReferenceProcessor : public CHeapObj {
// constructor
ReferenceProcessor():
_span((HeapWord*)NULL, (HeapWord*)NULL),
_discovered_refs(NULL),
_discoveredSoftRefs(NULL), _discoveredWeakRefs(NULL),
_discoveredFinalRefs(NULL), _discoveredPhantomRefs(NULL),
_discovering_refs(false),