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

Simplify usage of Compile::print_method() when debugging with gdb and enable its use with rr

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11, 12, 13, 14, 15
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b23

      Description

      When debugging with gdb, one can use

      (gdb) call C->print_method(PHASE_FAILURE, 0, 0)

      to print the current method. This, however, requires that all flags for enabling the Ideal Graph Visualizer to print methods in general are set. Moreover, if C is not defined one must either go up the stack or use:

      (gdb) call Compile::current()->print_method(PHASE_FAILURE, 0, 0)

      which is tedious. This could be simplified with a debug method such that we only need to call with an optional custom phase name:

      (gdb) call print_method(phase_name)


      The above gdb calls do not work when debugging with rr [1]. This RFE should also provide a possibility to print methods on the fly while stepping through the code with rr.

      [1] https://rr-project.org/

        Attachments

          Activity

            People

            • Assignee:
              chagedorn Christian Hagedorn
              Reporter:
              chagedorn Christian Hagedorn
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: