comparison src/share/vm/code/oopRecorder.hpp @ 17374:9928ad27a80e

OopRecorder should check for duplicates
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Wed, 08 Oct 2014 11:48:00 -0700
parents da91efe96a93
children 44b83285b645
comparison
equal deleted inserted replaced
17373:467ffc7f01cb 17374:9928ad27a80e
151 ValueRecorder<jobject> _oops; 151 ValueRecorder<jobject> _oops;
152 ValueRecorder<Metadata*> _metadata; 152 ValueRecorder<Metadata*> _metadata;
153 public: 153 public:
154 OopRecorder(Arena* arena = NULL): _oops(arena), _metadata(arena) {} 154 OopRecorder(Arena* arena = NULL): _oops(arena), _metadata(arena) {}
155 155
156 void check_for_duplicates(int index, jobject h) NOT_DEBUG_RETURN;
157
156 int allocate_oop_index(jobject h) { 158 int allocate_oop_index(jobject h) {
157 return _oops.allocate_index(h); 159 return _oops.allocate_index(h);
158 } 160 }
159 int find_index(jobject h) { 161 int find_index(jobject h) {
160 return _oops.find_index(h); 162 int result = _oops.find_index(h);
163 check_for_duplicates(result, h);
164 return result;
161 } 165 }
162 jobject oop_at(int index) { 166 jobject oop_at(int index) {
163 return _oops.at(index); 167 return _oops.at(index);
164 } 168 }
165 int oop_size() { 169 int oop_size() {