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

Resource allocated BitMaps are often cleared unnecessarily

    Details

      Description

      This bug relates to JDK-8155638 where bitmaps where cleared twice.

      There are places where we don't clear the bitmaps twice, but the initial clearing is unnecessary, since the following code will set all bits.

      See, for example:
      http://cr.openjdk.java.net/~stefank/8155638/webrev.01/src/share/vm/c1/c1_IR.cpp.udiff.html

      where _requires_phi_function is cleared even when all bits are going to be set to 1.

      and:
      http://cr.openjdk.java.net/~stefank/8155638/webrev.01/src/share/vm/compiler/methodLiveness.cpp.frames.html

      in MethodLiveness::BasicBlock::get_liveness_at

      1010 ResourceBitMap g(_gen.size()); g.set_from(_gen);
      1011 ResourceBitMap k(_kill.size()); k.set_from(_kill);

      where we first clear the bitmap, then copy all bits with set_from. Before G1 was introduced, the unnecessary clearing was not done.

        Issue Links

          Activity

          Hide
          neliasso Nils Eliasson added a comment -
          Changing back to bug. This is an regression.
          Show
          neliasso Nils Eliasson added a comment - Changing back to bug. This is an regression.
          Hide
          zmajo Zoltan Majo added a comment - - edited
          I=possible performance regression=L=>LMH=>P5
          Show
          zmajo Zoltan Majo added a comment - - edited I=possible performance regression=L=>LMH=>P5
          Hide
          thartmann Tobias Hartmann added a comment -
          ILW = Possible performance regression, during compilation, no workaround = LMH = P5
          Show
          thartmann Tobias Hartmann added a comment - ILW = Possible performance regression, during compilation, no workaround = LMH = P5
          Hide
          zmajo Zoltan Majo added a comment -
          Hi Rickard, could you please investigate this issue? (I thought of you because you are close to Stefan and can discuss possible issues). Thank you! Best regards, Zoltan
          Show
          zmajo Zoltan Majo added a comment - Hi Rickard, could you please investigate this issue? (I thought of you because you are close to Stefan and can discuss possible issues). Thank you! Best regards, Zoltan

            People

            • Assignee:
              rbackman Rickard Backman
              Reporter:
              stefank Stefan Karlsson
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: