< prev index next >

src/share/vm/code/compiledMethod.cpp

Print this page




 198 
 199 void CompiledMethod::verify_oop_relocations() {
 200   // Ensure sure that the code matches the current oop values
 201   RelocIterator iter(this, NULL, NULL);
 202   while (iter.next()) {
 203     if (iter.type() == relocInfo::oop_type) {
 204       oop_Relocation* reloc = iter.oop_reloc();
 205       if (!reloc->oop_is_immediate()) {
 206         reloc->verify_oop_relocation();
 207       }
 208     }
 209   }
 210 }
 211 
 212 
 213 ScopeDesc* CompiledMethod::scope_desc_at(address pc) {
 214   PcDesc* pd = pc_desc_at(pc);
 215   guarantee(pd != NULL, "scope must be present");
 216   return new ScopeDesc(this, pd->scope_decode_offset(),
 217                        pd->obj_decode_offset(), pd->should_reexecute(), pd->rethrow_exception(),
 218                        pd->return_oop());
 219 }
 220 
 221 void CompiledMethod::cleanup_inline_caches(bool clean_all/*=false*/) {
 222   assert_locked_or_safepoint(CompiledIC_lock);
 223 
 224   // If the method is not entrant or zombie then a JMP is plastered over the
 225   // first few bytes.  If an oop in the old code was there, that oop
 226   // should not get GC'd.  Skip the first few bytes of oops on
 227   // not-entrant methods.
 228   address low_boundary = verified_entry_point();
 229   if (!is_in_use() && is_nmethod()) {
 230     low_boundary += NativeJump::instruction_size;
 231     // %%% Note:  On SPARC we patch only a 4-byte trap, not a full NativeJump.
 232     // This means that the low_boundary is going to be a little too high.
 233     // This shouldn't matter, since oops of non-entrant methods are never used.
 234     // In fact, why are we bothering to look at oops in a non-entrant method??
 235   }
 236 
 237   // Find all calls in an nmethod and clear the ones that point to non-entrant,
 238   // zombie and unloaded nmethods.




 198 
 199 void CompiledMethod::verify_oop_relocations() {
 200   // Ensure sure that the code matches the current oop values
 201   RelocIterator iter(this, NULL, NULL);
 202   while (iter.next()) {
 203     if (iter.type() == relocInfo::oop_type) {
 204       oop_Relocation* reloc = iter.oop_reloc();
 205       if (!reloc->oop_is_immediate()) {
 206         reloc->verify_oop_relocation();
 207       }
 208     }
 209   }
 210 }
 211 
 212 
 213 ScopeDesc* CompiledMethod::scope_desc_at(address pc) {
 214   PcDesc* pd = pc_desc_at(pc);
 215   guarantee(pd != NULL, "scope must be present");
 216   return new ScopeDesc(this, pd->scope_decode_offset(),
 217                        pd->obj_decode_offset(), pd->should_reexecute(), pd->rethrow_exception(),
 218                        pd->return_oop(), pd->return_vt());
 219 }
 220 
 221 void CompiledMethod::cleanup_inline_caches(bool clean_all/*=false*/) {
 222   assert_locked_or_safepoint(CompiledIC_lock);
 223 
 224   // If the method is not entrant or zombie then a JMP is plastered over the
 225   // first few bytes.  If an oop in the old code was there, that oop
 226   // should not get GC'd.  Skip the first few bytes of oops on
 227   // not-entrant methods.
 228   address low_boundary = verified_entry_point();
 229   if (!is_in_use() && is_nmethod()) {
 230     low_boundary += NativeJump::instruction_size;
 231     // %%% Note:  On SPARC we patch only a 4-byte trap, not a full NativeJump.
 232     // This means that the low_boundary is going to be a little too high.
 233     // This shouldn't matter, since oops of non-entrant methods are never used.
 234     // In fact, why are we bothering to look at oops in a non-entrant method??
 235   }
 236 
 237   // Find all calls in an nmethod and clear the ones that point to non-entrant,
 238   // zombie and unloaded nmethods.


< prev index next >