2156 address low_boundary = verified_entry_point();
2157 if (is_not_entrant()) {
2158 low_boundary += NativeJump::instruction_size;
2159 // %%% Note: On SPARC we patch only a 4-byte trap, not a full NativeJump.
2160 // (See comment above.)
2161 }
2162 {
2163 // Visit all immediate references that are embedded in the instruction stream.
2164 RelocIterator iter(this, low_boundary);
2165 while (iter.next()) {
2166 if (iter.type() == relocInfo::metadata_type ) {
2167 metadata_Relocation* r = iter.metadata_reloc();
2168 // In this metadata, we must only follow those metadatas directly embedded in
2169 // the code. Other metadatas (oop_index>0) are seen as part of
2170 // the metadata section below.
2171 assert(1 == (r->metadata_is_immediate()) +
2172 (r->metadata_addr() >= metadata_begin() && r->metadata_addr() < metadata_end()),
2173 "metadata must be found in exactly one place");
2174 if (r->metadata_is_immediate() && r->metadata_value() != NULL) {
2175 Metadata* md = r->metadata_value();
2176 f(md);
2177 }
2178 } else if (iter.type() == relocInfo::virtual_call_type) {
2179 // Check compiledIC holders associated with this nmethod
2180 CompiledIC *ic = CompiledIC_at(&iter);
2181 if (ic->is_icholder_call()) {
2182 CompiledICHolder* cichk = ic->cached_icholder();
2183 f(cichk->holder_method());
2184 f(cichk->holder_klass());
2185 } else {
2186 Metadata* ic_oop = ic->cached_metadata();
2187 if (ic_oop != NULL) {
2188 f(ic_oop);
2189 }
2190 }
2191 }
2192 }
2193 }
2194
2195 // Visit the metadata section
2196 for (Metadata** p = metadata_begin(); p < metadata_end(); p++) {
|
2156 address low_boundary = verified_entry_point();
2157 if (is_not_entrant()) {
2158 low_boundary += NativeJump::instruction_size;
2159 // %%% Note: On SPARC we patch only a 4-byte trap, not a full NativeJump.
2160 // (See comment above.)
2161 }
2162 {
2163 // Visit all immediate references that are embedded in the instruction stream.
2164 RelocIterator iter(this, low_boundary);
2165 while (iter.next()) {
2166 if (iter.type() == relocInfo::metadata_type ) {
2167 metadata_Relocation* r = iter.metadata_reloc();
2168 // In this metadata, we must only follow those metadatas directly embedded in
2169 // the code. Other metadatas (oop_index>0) are seen as part of
2170 // the metadata section below.
2171 assert(1 == (r->metadata_is_immediate()) +
2172 (r->metadata_addr() >= metadata_begin() && r->metadata_addr() < metadata_end()),
2173 "metadata must be found in exactly one place");
2174 if (r->metadata_is_immediate() && r->metadata_value() != NULL) {
2175 Metadata* md = r->metadata_value();
2176 if (md != _method) f(md);
2177 }
2178 } else if (iter.type() == relocInfo::virtual_call_type) {
2179 // Check compiledIC holders associated with this nmethod
2180 CompiledIC *ic = CompiledIC_at(&iter);
2181 if (ic->is_icholder_call()) {
2182 CompiledICHolder* cichk = ic->cached_icholder();
2183 f(cichk->holder_method());
2184 f(cichk->holder_klass());
2185 } else {
2186 Metadata* ic_oop = ic->cached_metadata();
2187 if (ic_oop != NULL) {
2188 f(ic_oop);
2189 }
2190 }
2191 }
2192 }
2193 }
2194
2195 // Visit the metadata section
2196 for (Metadata** p = metadata_begin(); p < metadata_end(); p++) {
|