RFR (XS): Optimize branch frequency of G1's write post-barrier in C2

Man Cao manc at google.com
Fri Jun 14 05:13:52 UTC 2019


Hi all,
Can I have reviews for this improvement for G1's write post-barrier?  More
details are stated on the JBS page. Highlight: it reduces
CPU-cost-per-query by 1% for Google search frontend's production workload.
Webrev: https://cr.openjdk.java.net/~manc/8225776/webrev.00/
RFE: https://bugs.openjdk.java.net/browse/JDK-8225776

Some notes:
The RFE could be a duplicate of JDK-8130918. However, this patch does not
improve the performance of the microbenchmark in JDK-8130918. I'm not sure
if this patch fully addresses JDK-8130918.
Chuck Rasbold helped me to figure out the proper fix for the basic block
ordering by looking at the CFG before and after C2's PhaseBlockLayout. The
out-most if branch (xor) has to have a frequency greater than 0.5 to make
the  BBs laid out correctly. It is also more conventional to use
PROB_LIKELY_MAG
than PROB_LIKELY in C2.

-Man
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20190613/e9619aed/attachment.htm>


More information about the hotspot-gc-dev mailing list