Request for reviews (M): 6892186: SA does not dump debug info for scalar replaced objects

Vladimir Kozlov Vladimir.Kozlov at Sun.COM
Mon Oct 19 12:30:35 PDT 2009


http://cr.openjdk.java.net/~kvn/6892186/webrev.00

Fixed 6892186: SA does not dump debug info for scalar replaced objects

Problem:
Part of these changes are from Tom's SA disassembler work.
Dumping nmethods with scalar replaced objects results in
exceptions from the SA since it was not implemented.

Solution:
Implement scalar replaced objects debug info dump in SA.
Fix PrintOptoAssembly output for such info since it was not correct.
Add missing NULL checks in SA dump code.
Reformat SA debug info output to easy read.
Add "dumpcodecache" instruction to SA to dump all nmethods in codecache.

Reviewed by:

Fix verified (y/n): y, test output

Other testing:
JPRT

Here is OptoAssembly output:

177   	CALL,static  java.lang.Object::wait
         # sleep::test @ bci:126  L[0]=#ScObj0 L[1]=#ScObj1 L[2]=#ScObj2 L[3]=#ScObj3 L[4]=#ScObj4 L[5]=#Ptr0x080cffd8 L[6]=_ MON-BOX0=esp+32 MON-OBJ[0]=#Ptr0x080cffd8
         # ScObj0 sleep={ [iii :0]=#12 }
         # ScObj1 int[2]={ [0]=#0 , [1]=#34 }
         # ScObj2 sleep[2]={ [0]=#ScObj0 , [1]=esp + #12 }
         # ScObj3 int[2][]={ [0]=esp + #16 , [1]=#ScObj1 }
         # ScObj4 sleep[2][]={ [0]=esp + #8 , [1]=#ScObj2 }
         # OopMap{[8]=Oop [12]=Oop [16]=Oop [20]=Derived_oop_[8] off=380}

here is SA:

0xfa4d24b7:    call	0xfa4d0dd0
             static int test() @0xb61b3228 of public class sleep @0xb61b3278 @ bci = 126, line = 31
             locals ([0], #ScObj0) ([1], #ScObj1) ([2], #ScObj2) ([3], #ScObj3) ([4], #ScObj4) ([5], oop 0xb61b33c8) ([6], illegal)
             monitors (owner = oop 0xb61b33c8, lock = stack[32], normal)
             ScObj0 sleep={ [iii :0]=(#int 12) }
             ScObj1 int[2]={ [0]=(#int 0) [1]=(#int 34) }
             ScObj2 sleep[2]={ [0]=(##ScObj0) [1]=(#stack[12], oop) }
             ScObj3 int[2][]={ [0]=(#stack[16], oop) [1]=(##ScObj1) }
             ScObj4 sleep[2][]={ [0]=(#stack[8], oop) [1]=(##ScObj2) }
OopMap:
Oops:[8]  [12]  [16]
Derived oops:[20] = [8]

and here the java source:

      sleep sl = new sleep();
      sl.iii = 12;
      int[] ia = new int[2];
      ia[1] = 34;
      sleep[] sa = new sleep[2];
      sa[0] = sl;
      sa[1] = new sleep();
      sa[1].iii = 56;
      int[][] ia2 = new int[2][];
      ia2[0] = new int[1];
      ia2[1] = ia;
      ia2[0][0] = 78;
      sleep[][] sa2 = new sleep[2][];
      sa2[0] = new sleep[1];
      sa2[1] = sa;
      sa2[0][0] = new sleep();
      sa2[0][0].iii = 90;
      synchronized (sleep.class) {
          sleep.class.wait(1);
      }



More information about the hotspot-compiler-dev mailing list