RFR: 8264649: runtime/InternalApi/ThreadCpuTimesDeadlock.java crash in fastdebug C2 with -XX:-UseTLAB [v2]

Hui Shi hshi at openjdk.java.net
Wed Apr 7 12:09:09 UTC 2021


On Wed, 7 Apr 2021 11:29:06 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> Hui Shi has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix typo in test description
>
> src/hotspot/share/opto/phaseX.cpp line 1481:
> 
>> 1479:   // Smash all inputs to 'old', isolating him completely
>> 1480:   Node *temp = new Node(1);
>> 1481:   temp->init_req(0,nn);     // Add a use to nn to prevent him from dying
> 
> Just wondering, why do we even need this? Without that code, `remove_dead_node(old)` would kill `nn` as well if it becomes dead.

Thanks for your review!

Checking code history,  this code is quite old. From comments around, it doesn't want nn removed directly in PhaseIterGVN::subsume_node and leaves optimization to next GVN iteration.

In my understanding, it might save callers to insert codes checking if "nn" is removed/dead at every subsume_node/replace_node callsite, simplifies implementation.

8153779a hotspot/src/share/vm/opto/phaseX.cpp (J. Duke                  2007-12-01 00:00:00 +0000 1479)   // Smash all inputs to 'old', isolating him completely
2a0815a5 hotspot/src/share/vm/opto/phaseX.cpp (Tobias Hartmann          2014-06-02 08:07:29 +0200 1480)   Node *temp = new Node(1);
8153779a hotspot/src/share/vm/opto/phaseX.cpp (J. Duke                  2007-12-01 00:00:00 +0000 1481)   temp->init_req(0,nn);     // Add a use to nn to prevent him from dying
8153779a hotspot/src/share/vm/opto/phaseX.cpp (J. Duke                  2007-12-01 00:00:00 +0000 1482)   remove_dead_node( old );
8153779a hotspot/src/share/vm/opto/phaseX.cpp (J. Duke                  2007-12-01 00:00:00 +0000 1483)   temp->del_req(0);         // Yank bogus edge

> test/hotspot/jtreg/runtime/InternalApi/ThreadCpuTimesDeadlock.java line 36:
> 
>> 34:  * @test
>> 35:  * @bug 8264649
>> 36:  * @summary OSR compiled metthod crash when UseTLAB is off
> 
> Typo `metthod`.

Fixed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3336


More information about the hotspot-dev mailing list