--- old/src/share/vm/gc/shared/referenceProcessor.cpp 2016-04-08 12:37:54.186910060 +0200 +++ new/src/share/vm/gc/shared/referenceProcessor.cpp 2016-04-08 12:37:54.078905850 +0200 @@ -1090,6 +1090,15 @@ return true; } +bool ReferenceProcessor::has_discovered_references() { + for (uint i = 0; i < _max_num_q * number_of_subclasses_of_ref(); i++) { + if (!_discovered_refs[i].is_empty()) { + return true; + } + } + return false; +} + // Preclean the discovered references by removing those // whose referents are alive, and by marking from those that // are not active. These lists can be handled here