2170 assert(1 == (r->metadata_is_immediate()) + |
2170 assert(1 == (r->metadata_is_immediate()) + |
2171 (r->metadata_addr() >= metadata_begin() && r->metadata_addr() < metadata_end()), |
2171 (r->metadata_addr() >= metadata_begin() && r->metadata_addr() < metadata_end()), |
2172 "metadata must be found in exactly one place"); |
2172 "metadata must be found in exactly one place"); |
2173 if (r->metadata_is_immediate() && r->metadata_value() != NULL) { |
2173 if (r->metadata_is_immediate() && r->metadata_value() != NULL) { |
2174 Metadata* md = r->metadata_value(); |
2174 Metadata* md = r->metadata_value(); |
2175 f(md); |
2175 if (md != _method) f(md); |
2176 } |
2176 } |
2177 } else if (iter.type() == relocInfo::virtual_call_type) { |
2177 } else if (iter.type() == relocInfo::virtual_call_type) { |
2178 // Check compiledIC holders associated with this nmethod |
2178 // Check compiledIC holders associated with this nmethod |
2179 CompiledIC *ic = CompiledIC_at(&iter); |
2179 CompiledIC *ic = CompiledIC_at(&iter); |
2180 if (ic->is_icholder_call()) { |
2180 if (ic->is_icholder_call()) { |
2196 if (*p == Universe::non_oop_word() || *p == NULL) continue; // skip non-oops |
2196 if (*p == Universe::non_oop_word() || *p == NULL) continue; // skip non-oops |
2197 Metadata* md = *p; |
2197 Metadata* md = *p; |
2198 f(md); |
2198 f(md); |
2199 } |
2199 } |
2200 |
2200 |
2201 // Visit metadata not embedded in the other places. |
2201 // Call function Method*, not embedded in these other places. |
2202 if (_method != NULL) f(_method); |
2202 if (_method != NULL) f(_method); |
2203 } |
2203 } |
2204 |
2204 |
2205 void nmethod::oops_do(OopClosure* f, bool allow_zombie) { |
2205 void nmethod::oops_do(OopClosure* f, bool allow_zombie) { |
2206 // make sure the oops ready to receive visitors |
2206 // make sure the oops ready to receive visitors |