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

Shenandoah: SBC2Support::test_gc_state takes loop for wrong control

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8-shenandoah, 11-shenandoah, 14, 15
    • Fix Version/s: 15
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Resolved In Build:
      b23

      Description

      When doing the refactoring in JDK-8244509, I accidentally made a change that was not semantic-preserving: get_loop is called on new ctrl from IfTrueNode, not the ctrl we have been passed. It went correctly in test_null and test_in_cset, but not in test_gc_state.

      Candidate fix:

      diff -r 730eb308516a src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp
      --- a/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp Fri May 08 08:13:15 2020 -0400
      +++ b/src/hotspot/share/gc/shenandoah/c2/shenandoahSupport.cpp Fri May 08 19:24:50 2020 +0200
      @@ -877,11 +877,11 @@
       
         IfNode* gc_state_iff = new IfNode(old_ctrl, gc_state_bool, PROB_UNLIKELY(0.999), COUNT_UNKNOWN);
         ctrl = new IfTrueNode(gc_state_iff);
         test_fail_ctrl = new IfFalseNode(gc_state_iff);
       
      - IdealLoopTree* loop = phase->get_loop(ctrl);
      + IdealLoopTree* loop = phase->get_loop(old_ctrl);
         phase->register_control(gc_state_iff, loop, old_ctrl);
         phase->register_control(ctrl, loop, gc_state_iff);
         phase->register_control(test_fail_ctrl, loop, gc_state_iff);
       
         phase->register_new_node(thread, old_ctrl);

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shade Aleksey Shipilev
                Reporter:
                shade Aleksey Shipilev
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: