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

Vladimir Kozlov vladimir.kozlov at oracle.com
Thu Apr 10 21:29:37 UTC 2014


Igor,

Please, clean up code style of if() in  MachEpilogNode methods you 
touched in sparc.ad. The same in output_h.cpp.

I think you should separate into 2 flags Flag_avoid_before and 
Flag_avoid_after:

Flag_avoid_back_to_back  = Flag_may_be_short_branch << 1, // Flag has 
two bits

And use them instead of new MachNode::AvoidBackToBackFlag. I don't like 
next expression:

ins_avoid_back_to_back() * Flag_avoid_back_to_back

thanks,
Vladimir

On 4/10/14 11:54 AM, Igor Veresov wrote:
> 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%
> <http://aurora.se.oracle.com/performance/rest/perf/trend?name=cdbond%20changes&type=Solaris%20SPARC%20T4-1&series=SPECjbb2005>
> SPECjbb2013	
> 1.75%
> <http://aurora.se.oracle.com/performance/rest/perf/trend?name=cdbond%20changes&type=Solaris%20SPARC%20T4-1&series=SPECjbb2013>
> SPECjvm2008-Compiler	
> -1.42%
> <http://aurora.se.oracle.com/performance/rest/perf/trend?name=cdbond%20changes&type=Solaris%20SPARC%20T4-1&series=SPECjvm2008-Compiler>
> SPECjvm2008-Compress	
> -0.21%
> <http://aurora.se.oracle.com/performance/rest/perf/trend?name=cdbond%20changes&type=Solaris%20SPARC%20T4-1&series=SPECjvm2008-Compress>
> SPECjvm2008-Crypto	
> 0.02%
> <http://aurora.se.oracle.com/performance/rest/perf/trend?name=cdbond%20changes&type=Solaris%20SPARC%20T4-1&series=SPECjvm2008-Crypto>
> SPECjvm2008-Derby	
> -0.02%
> <http://aurora.se.oracle.com/performance/rest/perf/trend?name=cdbond%20changes&type=Solaris%20SPARC%20T4-1&series=SPECjvm2008-Derby>
> SPECjvm2008-MPEG	
> 0.07%
> <http://aurora.se.oracle.com/performance/rest/perf/trend?name=cdbond%20changes&type=Solaris%20SPARC%20T4-1&series=SPECjvm2008-MPEG>
> SPECjvm2008-SciMark	
> 0.42%
> <http://aurora.se.oracle.com/performance/rest/perf/trend?name=cdbond%20changes&type=Solaris%20SPARC%20T4-1&series=SPECjvm2008-SciMark>
> SPECjvm2008-Serial	
> 0.11%
> <http://aurora.se.oracle.com/performance/rest/perf/trend?name=cdbond%20changes&type=Solaris%20SPARC%20T4-1&series=SPECjvm2008-Serial>
> SPECjvm2008-XML	
> -0.56%
> <http://aurora.se.oracle.com/performance/rest/perf/trend?name=cdbond%20changes&type=Solaris%20SPARC%20T4-1&series=SPECjvm2008-XML>
>
>
> Thanks!
> igor


More information about the hotspot-compiler-dev mailing list