--- old/src/share/vm/gc/shared/referenceProcessor.hpp 2016-03-16 08:24:45.390807461 -0700 +++ new/src/share/vm/gc/shared/referenceProcessor.hpp 2016-03-16 08:24:45.290807456 -0700 @@ -225,7 +225,7 @@ uint num_q() { return _num_q; } uint max_num_q() { return _max_num_q; } - void set_active_mt_degree(uint v) { _num_q = v; } + void set_active_mt_degree(uint v); DiscoveredList* discovered_refs() { return _discovered_refs; } @@ -327,7 +327,7 @@ uint next_id() { uint id = _next_id; assert(!_discovery_is_mt, "Round robin should only be used in serial discovery"); - if (++_next_id >= _num_q) { + if (++_next_id == _num_q) { _next_id = 0; } assert(_next_id < _num_q, "_next_id %u _num_q %u _max_num_q %u", _next_id, _num_q, _max_num_q);