Generating oopmaps

Gary Benson gbenson at
Wed Jul 30 04:58:49 PDT 2008

Hi all,

I'm writing a new compiler for HotSpot, and I'm trying to figure out
what I need to include in my generated oopmaps.  My main issue is
that, for all but the top frame, a frame may not know what is in some
its own stack slots because they're now the locals of another frame.
As an example, assuming my ABI stack looks something like this:


 0xf7fbd640: stack[3]              = 0xd1ea8c00
 0xf7fbd644: stack[2]              = 0xd1ea7738
 0xf7fbd648: stack[1]              = 0xd1eaff38
 0xf7fbd64c: stack[0]              = 0xd1eaff38
 0xf7fbd650: method                =;[Ljava/lang/String;Ljava/util/Vector;Ljava/util/Hashtable;)V
 0xf7fbd654: frame_type            = SHARK_FRAME
 0xf7fbd658: next_frame            = 0xf7fbd684

 0xf7fbd65c: stack[7]              = 0xf7fbd61c = the top frame's local[4]
 0xf7fbd660: stack[6]              = 0xd1eafc98 = the top frame's local[3]
 0xf7fbd664: stack[5]              = 0x00000002 = the top frame's local[2]
 0xf7fbd668: stack[4]              = 0xd1ec0450 = the top frame's local[1]
 0xf7fbd66c: stack[3]              = 0xd1ec0438 = the top frame's local[0]
 0xf7fbd670: stack[2]              = 0xd1eabf38
 0xf7fbd674: stack[1]              = 0xd1ea7738
 0xf7fbd678: stack[0]              = 0xd1ec02d8
 0xf7fbd67c: method                =;[Ljava/lang/String;Ljava/util/Vector;Ljava/util/Hashtable;)V
 0xf7fbd680: frame_type            = SHARK_FRAME
 0xf7fbd684: next_frame            = 0xf7fbd6b0

 0xf7fbd688: stack[7]              = 0xd1ea7b50 = the middle frame's local[4]
 0xf7fbd68c: stack[6]              = 0xd1ea7738 = the middle frame's local[3]
 0xf7fbd690: stack[5]              = 0x00000002 = the middle frame's local[2]
 0xf7fbd694: stack[4]              = 0xd1ec0450 = the middle frame's local[1]
 0xf7fbd698: stack[3]              = 0xd1ec0438 = the middle frame's local[0]
 0xf7fbd69c: stack[2]              = 0xd1ea7728
 0xf7fbd6a0: stack[1]              = 0xd1ea70c0
 0xf7fbd6a4: stack[0]              = 0xd1ec02d8
 0xf7fbd6a8: method                =;[Ljava/lang/String;Ljava/util/Vector;Ljava/util/Hashtable;)V
 0xf7fbd6ac: frame_type            = SHARK_FRAME
 0xf7fbd6b0: next_frame            = 0xf7fbd720


Would it be correct for the oopmap of the middle frame (ie
0xf7fbd65c-0xf7fbd684) to include oops in the ranges
0xf7fbd670-0xf7fbd678 and 0xf7fbd688-0xf7fbd698) but to not
include oops in the range 0xf7fbd65c-0xf7fbd66c?

Another question is, when there are monitors in the frames,
should I include the objects in the monitors in the oopmaps
I generate?

Thanks in advance!



More information about the hotspot-dev mailing list