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

Improve C1 register allocator logging and debugging support

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 16
    • 16
    • hotspot
    • b13

      In the process of understanding and tracing back the problem of JDK-8249603, I used some additional debugging and logging code. In this RFE, I want to add this code and some additional enhancements to simplify the debugging of another C1 register allocator bug in the future.

      Summary:
      - find_interval(number): Can be called like that from gdb anywhere to find an interval with the given number.
      - Interval::print_children()/print_parent(): Useful when debugging with gdb to quickly show the split children and parent.
      - LinearScan::print_reg_num(number): Prints the register or stack location for this register number. This is useful in some places (logging with TraceLinearScanLevel set) where it just printed a number which first had to be manually looked up in other logs.

      Possible future work (not covered in this RFE):
      - The TraceLinearScanLevel flag is too generic and prints a lot of things (especially at level 4). It would be useful to split it into separate flags to only print a subset of the entire linear scan register allocator algorithm or a specific part but with more details.

            chagedorn Christian Hagedorn
            chagedorn Christian Hagedorn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: