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

Improve G1 pre-barrier C2 cost estimate

XMLWordPrintable

      Currently, the pre-barrier has an estimated cost of 50 nodes for the C2 compiler for code generation.

      This cost assumes that all of these 50 nodes are in the regular/fast path of the generated code - however this is not the case, the large majority of these nodes are part of the seldomly executed slow path and do not matter for code layout purposes.

      This is similar to ZGC, and similar to ZGC the node cost should be reduced to just 4 (cmp, bool, if, if-proj for the fast path/jmp).

      Likely this will not have a lot of impact on code generation because the post-barrier's cost is still overwhelmingly large (60), but that will be fixed in JDK-8342382.

            tschatzl Thomas Schatzl
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: