Using InterpreterOopMap

Peter Helfer at
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

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,
            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);
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the hotspot-runtime-dev mailing list