RFR: 8335536: Fix assertion failure in IdealGraphPrinter when append is true [v2]
Qizheng Xing
qxing at openjdk.org
Wed Jul 3 06:34:32 UTC 2024
On Wed, 3 Jul 2024 05:52:55 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:
>> Qizheng Xing has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add comments for `IdealGraphPrinter::update_compiled_method`.
>
> src/hotspot/share/opto/idealGraphPrinter.cpp line 920:
>
>> 918: end_method();
>> 919: begin_method();
>> 920: }
>
> Could you explain this change and maybe add a comment?
Reason for adding `if (_append)`: in append mode, the constructor of `IdealGraphPrinter` will not call `begin_method`, so we should not call `end_method` here to prevent the assertion failure, just update `_current_method`.
Reason for removing `_current_method = nullptr;`: `_current_method` is maintained and cleared in `end_method`, we do not need to handle it manually here.
Added more comments in the latest commit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19986#discussion_r1663580357
More information about the hotspot-compiler-dev
mailing list