Using InterpreterOopMap

Tom Rodriguez Thomas.Rodriguez at Sun.COM
Tue Dec 4 10:21:19 PST 2007


> BTW, is there a method which verifies the oop in C as it is done in 
> verifyOop(Register) ?

oopDesc::is_oop() will do tests similar to, but more powerful than, the 
verify_oop assembler macro.  Both of these can still be faked out in 
some rare cases but are very reliable in the debug and fastdebug VM.  We 
usually scrog the unused area of the heap which helps in detecting bad oops.

tom

> 
> #13 0x0644d708 in JVM_handle_linux_signal () at 
> /home/peterh/workspace/openjdk/hotspot/src/os_cpu/linux_i486/vm/os_linux_i486.cpp:461
> #14 0x06447c8d in signalHandler (sig=11, info=0xad7259dc, uc=0xad725a5c) 
> at /home/peterh/workspace/openjdk/hotspot/src/os/linux/vm/os_linux.cpp:3002
> #15 <signal handler called>
> #16 0x0611c292 in Klass::oop_is_instance () at 
> /home/peterh/workspace/openjdk/hotspot/src/share/vm/oops/klass.hpp:599
> #17 0x0611c2ff in oopDesc::is_instance () at 
> /home/peterh/workspace/openjdk/hotspot/src/share/vm/oops/oop.inline.hpp:58
> #18 0x064bbf60 in SpeculationReplaceClosure::do_oop () at 
> /home/peterh/workspace/openjdk/hotspot/src/share/vm/runtime/speculation.cpp:562 
> 
> #19 0x064c0f4a in MyInterpreterFrameClosure::offset_do () at 
> /home/peterh/workspace/openjdk/hotspot/src/share/vm/runtime/thread.hpp:1420
> #20 0x0643ef77 in InterpreterOopMap::iterate_oop (this=0xad725e70, 
> oop_closure=0xad725e94)
>     at 
> /home/peterh/workspace/openjdk/hotspot/src/share/vm/interpreter/oopMapCache.cpp:222
> #21 0x064bc807 in Speculation::interpFrameAdaptSP (thread=0x8103c00, 
> rsp=0xad725f70, rbp=0xad725f9c, pc=0xb5b757ff "\213eøÇEø")
>     at 
> /home/peterh/workspace/openjdk/hotspot/src/share/vm/runtime/speculation.cpp:806
> 
> 
> caused by this code:
> 
> void SpeculationReplaceClosure::do_oop(oop* p){
>         #define PRINT_PROP(name) tty->print_cr("is_" #name 
> ":\t%s",(*p)->is_ ## name() ? "true" : "false")
>         assert(!SafepointSynchronize::is_at_safepoint(), "invariant") ;
>         if(p != NULL && (*p) != NULL){
>         tty->print("SpecReplaceClosure: ref %08X:\n", p);
>                 if((*p)->is_instance() ||
>                    (*p)->is_instanceRef()  ||
>                    (*p)->is_array() ||
>                    (*p)->is_objArray()){
>                         PRINT_PROP(instance);
>                         PRINT_PROP(instanceRef);
>                         PRINT_PROP(array);
>                         PRINT_PROP(objArray);
>                 }
>                 else {
>                         PRINT_PROP(klass);
>                         PRINT_PROP(thread);
>                         PRINT_PROP(method);
>                         PRINT_PROP(constMethod);
>                         PRINT_PROP(methodData);
>                         PRINT_PROP(constantPool);
>                         PRINT_PROP(typeArray);
>                         PRINT_PROP(symbol);
>                         PRINT_PROP(javaArray);
>                         PRINT_PROP(compiledICHolder);
>                 }
>         } else {
>                 tty->print("SpecReplaceClosure: INVALID OOP AT %08X 
> POINTING TO %08X :\n", p, *p);
>         }
> 
> 
>         #undef PRINT_PROP
> }
> 
> 
> Regards,
> Peter
> 



More information about the hotspot-runtime-dev mailing list