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

Investigate probability-based compilation of G1 write barrier in C2

XMLWordPrintable

      The G1 post-barrier is quite large, containing several if's.

      E.g. for

      x.a = y;

      if (region(@x.a) == region(y)) exit
      if (y == nullptr) exit
      if (card(@x.a) == Young) exit
      [...]
      if (card(@x.a) == Dirty) exit
      [...]
      if (dcqs is full) goto veryslowpath
      [...]

      All of these conditions are inlined into the C2 node tree with fixed static probabilities; some old investigation however showed that they differ quite a bit depending on the application (well, benchmarks).

      Investigate whether profiling this branches helps performance by inserting appropriate counters into interpreter/c1 and use them for c2 compilation.

      This is the same request as JDK-8130918. JDK-8225776 shows some manual branch-order changes make sense, but it would be interesting to see if automatic adaptation gives better results.

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

              Created:
              Updated: