RFR(M): 8038297 Avoid placing CTI immediately following cbcond instruction on T4

Igor Veresov igor.veresov at oracle.com
Thu Apr 10 18:54:45 UTC 2014


We need to put nops between cbcond instructions and CTI instructions, because otherwise it causes a pipeline flush.
This change extends the notion of the avoid_back_to_back instruction attribute to hold a 2 bits flag, with bits being AVOID_BEFORE and AVOID_AFTER.  The meaning of the bits is that an instruction with the AVOID_BEFORE flag cannot immediately follow one with AVOID_AFTER flag. The assembler has been modified accordingly to ensure that we don’t have a CTI instruction immediately following a cbcond instruction.

Webrev: http://cr.openjdk.java.net/~iveresov/8038297/webrev.00/

Testing: CTW, hotspot regression tests, JPRT

There is a significant performance gain on the microbenchmark that exposed the problem.
Before with -XX:+UseCBCond: 106.985ns
Before with -XX:-UseCBCond: 94.8967ns
After with -XX:+UseCBCond: 94.5262ns


Other performance results (some gains with jetstream and volano):
==============================================================================
vanilla.logs:
  Benchmark           Samples        Mean     Stdev             Geomean Weight
  reference_server         20    16136.35    107.24
    jetstream              20      153.30      1.63             0.10
    scimark                20      353.47      5.78             0.15
    specjbb2000            20   220984.11    638.71             0.15
    specjbb2005            20   287778.70   3987.52             0.25
    specjvm98              20      295.09      1.41             0.15
    volano25               20   224179.95   5213.65             0.20
==============================================================================
hack1.logs:
  Benchmark           Samples        Mean     Stdev   %Diff     P  Significant
  reference_server         20    16357.48    111.46    1.37 0.000          Yes
    jetstream              20      160.82      2.07    4.90 0.000          Yes
    scimark                20      351.65      5.53   -0.51 0.316            *
    specjbb2000            20   221142.43   1247.38    0.07 0.617            *
    specjbb2005            20   288196.75   4598.83    0.15 0.760            *
    specjvm98              20      298.11      0.89    1.02 0.000          Yes
    volano25               20   232848.15   3952.61    3.87 0.000          Yes
==============================================================================

There are not statistically significant changes to specjbb2013 or specjvm2008:
Benchmark	Solaris SPARC T4-1
SPECjbb2005	
0.99%
SPECjbb2013	
1.75%
SPECjvm2008-Compiler	
-1.42%
SPECjvm2008-Compress	
-0.21%
SPECjvm2008-Crypto	
0.02%
SPECjvm2008-Derby	
-0.02%
SPECjvm2008-MPEG	
0.07%
SPECjvm2008-SciMark	
0.42%
SPECjvm2008-Serial	
0.11%
SPECjvm2008-XML	
-0.56%

Thanks!
igor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20140410/14a5b19e/attachment-0001.html>


More information about the hotspot-compiler-dev mailing list