JDK-8283890 : Changes in CFG file format break C1Visualizer
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 18,19
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-03-29
  • Updated: 2022-06-21
  • Resolved: 2022-03-31
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 19
19 b17Fixed
Related Reports
Relates :  
Description
A change in the CFG file format introduced by JDK-8277496 makes the log file unreadable by the C1Visualizer tool.

The change adds a new line in the CFG file "(block has no end, cannot print successors)" that the C1Visualizer tool is not able to parse:

begin_cfg
  name "BlockListBuilder virtual void java.lang.Object.<init>()"
  begin_block
    name "B0"
    from_bci 0
    to_bci -1
    predecessors
    (block has no end, cannot print successors).              <==== 
    xhandlers
    flags "std"
  end_block
end_cfg

There's no fundamental reason to provide the "no end block" information in the log file, instead a line tagged "successors" with an empty set of successors would be sufficient and would not break the C1Visualizer:

begin_cfg
  name "BlockListBuilder virtual void java.lang.Object.<init>()"
  begin_block
    name "B0"
    from_bci 0
    to_bci -1
    predecessors
    successors                                <==============
    xhandlers
    flags "std"
  end_block
end_cfg


The C1Visualizer tool is not maintained anymore, so fixing it is not an option.
An alternative solution would be to use a script to "fix" log files before opening them with the C1Visualizer, but it seems to add an unnecessary step in the process.

Comments
A pull request was submitted for review. URL: https://git.openjdk.org/jdk18u/pull/171 Date: 2022-06-21 09:04:59 +0000
21-06-2022

Changeset: 207b0998 Author: Frederic Parain <fparain@openjdk.org> Date: 2022-03-31 15:54:51 +0000 URL: https://git.openjdk.java.net/jdk/commit/207b0998580a8e01395deb9c46c84b20f6e59883
31-03-2022

ILW = output format regression breaks tool parsing; always?; post-process log files = MHM = P3
30-03-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8041 Date: 2022-03-30 12:32:42 +0000
30-03-2022