Using InterpreterOopMap

Peter Helfer peter.helfer.java at gmail.com
Tue Dec 4 05:57:01 PST 2007


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
fields in the interpreter frame, like methodOop, methodData, cpCacheOop ?
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 ?

Regards, Peter




if (TaggedStackInterpreter) {
            // process locals & expression stack
            InterpreterOopMap *mask = NULL;
        #ifdef ASSERT
            InterpreterOopMap oopmap_mask;
            OopMapCache::compute_one_oop_map(oldmethod, oldbci,
&oopmap_mask);
            mask = &oopmap_mask;
        #endif // ASSERT
            f.oops_interpreted_locals_do(&rpl, max_locals, mask);
            f.oops_interpreted_expressions_do(&rpl, signature, is_static,
max_stack, max_locals, mask);
         } else {
            InterpreterFrameClosure blk(&f, max_locals, max_stack, &rpl);
            // process locals & expression stack
            InterpreterOopMap mask;
            OopMapCache::compute_one_oop_map(oldmethod, oldbci, &mask);
            mask.iterate_oop(&blk);
         }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20071204/b3a270d7/attachment.html 


More information about the hotspot-runtime-dev mailing list