Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6276264

some stacks cannot be walked with DTrace's jstack()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: solaris_10
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • CPU:
      x86
    • OS:
      solaris_10

      Description

      [ahl 5.25.2005]

      Since JITed code may use %rbp/%ebp as a scratch register (rather than as the frame pointer) DTrace's jstack() action cannot always capture a full stack backtrace.
      ###@###.### 2005-05-25 22:31:36 GMT
      ###@###.### 2005-05-25 22:34:10 GMT

        Issue Links

          Activity

          Hide
          alanb Alan Bateman added a comment -
          BT2:EVALUATION

          C2 uses ebp as a general purpose register.
          ###@###.### 2005-05-26 19:57:25 GMT

          The same problem has been already solved for Solaris pstack.
          Currently, pstack on x86 is able to walk compiled C2 frames.
          The idea is that the libjvm_db always returns right information back to
          pstack, so it is always able to walk the java stack.

          Similar private interface can be iimplemented between dtrace and jhelper.d.
          Probably, some speciall D-script action can be added to allow jhelper.d
          to provide feedback needed to the dtrace framework.

          The following is the info from Tom Rodriguez:

          "The server VM uses the frame pointer as an allocatable register and there's no way to turn that off. Stopping using it would require some fairly major surgery in 1.5 and would likely have a performance impact on benchmarks we care about. In 1.6 changes in the internal java calling convention might make it possible to present a walkable stack chain without losing the use of ebp. I'm just guessing on that since no one's actually tried to implement it. It would be very hard to do something similar in 1.5 though.

          It might also be possible to make jhelper.d smarter about walking the stack. The needed information is all there in the VM and in fact libjvm_db is able to figure this out. The problem is that we would need to pass information back to dtrace about where ebp was or what the stack frame size is and I don't think such an interface exists."

          Another task which could be solved by providng a feedback to the dtrace
          framework is walking virtual frames. The interface between pstack and
          libjvm_db currently allows to print the inlined virtual frames.

          ###@###.### 2005-05-31 23:28:37 GMT
          Show
          alanb Alan Bateman added a comment - BT2:EVALUATION C2 uses ebp as a general purpose register. ###@###.### 2005-05-26 19:57:25 GMT The same problem has been already solved for Solaris pstack. Currently, pstack on x86 is able to walk compiled C2 frames. The idea is that the libjvm_db always returns right information back to pstack, so it is always able to walk the java stack. Similar private interface can be iimplemented between dtrace and jhelper.d. Probably, some speciall D-script action can be added to allow jhelper.d to provide feedback needed to the dtrace framework. The following is the info from Tom Rodriguez: "The server VM uses the frame pointer as an allocatable register and there's no way to turn that off. Stopping using it would require some fairly major surgery in 1.5 and would likely have a performance impact on benchmarks we care about. In 1.6 changes in the internal java calling convention might make it possible to present a walkable stack chain without losing the use of ebp. I'm just guessing on that since no one's actually tried to implement it. It would be very hard to do something similar in 1.5 though. It might also be possible to make jhelper.d smarter about walking the stack. The needed information is all there in the VM and in fact libjvm_db is able to figure this out. The problem is that we would need to pass information back to dtrace about where ebp was or what the stack frame size is and I don't think such an interface exists." Another task which could be solved by providng a feedback to the dtrace framework is walking virtual frames. The interface between pstack and libjvm_db currently allows to print the inlined virtual frames. ###@###.### 2005-05-31 23:28:37 GMT

            People

            • Assignee:
              blacklion Lev Serebryakov (Inactive)
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: