-
Enhancement
-
Resolution: Unresolved
-
P4
-
21
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 asJDK-8130918. JDK-8225776 shows some manual branch-order changes make sense, but it would be interesting to see if automatic adaptation gives better results.
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
- relates to
-
JDK-8225776 Optimize branch frequency of G1's write post-barrier in C2
-
- Resolved
-
-
JDK-8130918 G1 barriers are laid out in full on critical path
-
- Closed
-