equal
deleted
inserted
replaced
220 VerifyContainsOopClosure cl(p); |
220 VerifyContainsOopClosure cl(p); |
221 oops_do(&cl); |
221 oops_do(&cl); |
222 return cl.found(); |
222 return cl.found(); |
223 } |
223 } |
224 |
224 |
|
225 #ifndef PRODUCT |
|
226 bool ClassLoaderData::ChunkedHandleList::owner_of(oop* oop_handle) { |
|
227 Chunk* chunk = _head; |
|
228 while (chunk != NULL) { |
|
229 if (&(chunk->_data[0]) <= oop_handle && oop_handle < &(chunk->_data[chunk->_size])) { |
|
230 return true; |
|
231 } |
|
232 chunk = chunk->_next; |
|
233 } |
|
234 return false; |
|
235 } |
|
236 #endif // PRODUCT |
|
237 |
225 bool ClassLoaderData::claim() { |
238 bool ClassLoaderData::claim() { |
226 if (_claimed == 1) { |
239 if (_claimed == 1) { |
227 return false; |
240 return false; |
228 } |
241 } |
229 |
242 |
757 |
770 |
758 void ClassLoaderData::remove_handle(OopHandle h) { |
771 void ClassLoaderData::remove_handle(OopHandle h) { |
759 assert(!is_unloading(), "Do not remove a handle for a CLD that is unloading"); |
772 assert(!is_unloading(), "Do not remove a handle for a CLD that is unloading"); |
760 oop* ptr = h.ptr_raw(); |
773 oop* ptr = h.ptr_raw(); |
761 if (ptr != NULL) { |
774 if (ptr != NULL) { |
762 assert(_handles.contains(*ptr), "Got unexpected handle " PTR_FORMAT, p2i(ptr)); |
775 assert(_handles.owner_of(ptr), "Got unexpected handle " PTR_FORMAT, p2i(ptr)); |
763 // This root is not walked in safepoints, and hence requires an appropriate |
776 // This root is not walked in safepoints, and hence requires an appropriate |
764 // decorator that e.g. maintains the SATB invariant in SATB collectors. |
777 // decorator that e.g. maintains the SATB invariant in SATB collectors. |
765 RootAccess<IN_CONCURRENT_ROOT>::oop_store(ptr, oop(NULL)); |
778 RootAccess<IN_CONCURRENT_ROOT>::oop_store(ptr, oop(NULL)); |
766 } |
779 } |
767 } |
780 } |