Using InterpreterOopMap

steve goldman Steve.Goldman at Sun.COM
Tue Dec 4 06:40:37 PST 2007

Peter Helfer wrote:
> Ok, right now I'm seeing some progress in my project, so I want to be able
> to go through the Oops in a interpreter frame, using InterpreterOopMap and
> my own closure (which essentially should duplicate the existing object and
> replace the original at that position)
> I copied the code over from frame.cpp / oops_interpreted_do , and here is my
> question:
> Which oops does the iterate_oop touch ?
> I assume at least the expression stack, locals, but what about the other

expression stack and locals.

> fields in the interpreter frame, like methodOop, methodData, cpCacheOop ?

All of the oops in an interpreter frame that are known up front like 
methodOop, etc. are  handled by the code like:


the oopmap is only used to find oops that are dependent on the 
particular bci.

> What would happen if nullified these fields before, does the iterator go
> through anyway, or does it do a null check, i.e. can I assume that all
> OopClosure.do_oop(oop* p) calls are given a valid oop p, pointing to a valid
> oop ?

NULLs are valid oops. p is a pointer to an oop, not an oop, so it should 
never be NULL though what it points to could well be NULL.


More information about the hotspot-runtime-dev mailing list