# HG changeset patch # User Tom Rodriguez # Date 1413240739 25200 # Node ID 50942f0169679128478f9120c7f8d7290a817011 # Parent 307b26f8b5d1c06c9165c9a004c55dc664024761 remove duplicate check in OopRecorder diff -r 307b26f8b5d1 -r 50942f016967 src/share/vm/code/oopRecorder.cpp --- a/src/share/vm/code/oopRecorder.cpp Mon Oct 13 21:15:03 2014 +0200 +++ b/src/share/vm/code/oopRecorder.cpp Mon Oct 13 15:52:19 2014 -0700 @@ -34,15 +34,6 @@ template int ValueRecorder::_find_index_calls = 0; template int ValueRecorder::_hit_indexes = 0; template int ValueRecorder::_missed_indexes = 0; - -void OopRecorder::check_for_duplicates(int index, jobject h) { - oop o = JNIHandles::resolve(h); - for (int i = 1; i < oop_count(); i++) { - if (o == JNIHandles::resolve(oop_at(i)) && index != i) { - assert(false, "duplicate found"); - } - } -} #endif //ASSERT template ValueRecorder::ValueRecorder(Arena* arena) { diff -r 307b26f8b5d1 -r 50942f016967 src/share/vm/code/oopRecorder.hpp --- a/src/share/vm/code/oopRecorder.hpp Mon Oct 13 21:15:03 2014 +0200 +++ b/src/share/vm/code/oopRecorder.hpp Mon Oct 13 15:52:19 2014 -0700 @@ -192,15 +192,11 @@ } } - void check_for_duplicates(int index, jobject h) NOT_DEBUG_RETURN; - int allocate_oop_index(jobject h) { return _oops.allocate_index(h); } int find_index(jobject h) { - int result = _object_lookup != NULL ? _object_lookup->find_index(h, this) : _oops.find_index(h); - check_for_duplicates(result, h); - return result; + return _object_lookup != NULL ? _object_lookup->find_index(h, this) : _oops.find_index(h); } jobject oop_at(int index) { return _oops.at(index);