JDK-8251093 : Improve C1 register allocator logging and debugging support
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-08-04
  • Updated: 2020-10-22
  • Resolved: 2020-08-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16 b13Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
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.
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/865b2c989ca8 User: chagedorn Date: 2020-08-26 13:44:12 +0000
26-08-2020

http://cr.openjdk.java.net/~chagedorn/8251093/webrev.02/
20-08-2020