RFR(s) 8170153: PPC64: Poor StrictMath performance due to non-optimized compilation
Doerr, Martin
martin.doerr at sap.com
Wed Nov 23 14:38:09 UTC 2016
Hi Gustavo,
thanks for providing the webrevs.
I have ran the StrictMath jck tests which fail when building with -O3 and without -ffp-contract=off:
FailedTests:
api/java_lang/StrictMath/desc.html#acos javasoft.sqe.tests.api.java.lang.StrictMath.acos_test
api/java_lang/StrictMath/desc.html#asin javasoft.sqe.tests.api.java.lang.StrictMath.asin_test
api/java_lang/StrictMath/desc.html#atan javasoft.sqe.tests.api.java.lang.StrictMath.atan_test
api/java_lang/StrictMath/desc.html#atan2 javasoft.sqe.tests.api.java.lang.StrictMath.atan2_test
api/java_lang/StrictMath/desc.html#cos javasoft.sqe.tests.api.java.lang.StrictMath.cos_test
api/java_lang/StrictMath/desc.html#exp javasoft.sqe.tests.api.java.lang.StrictMath.exp_test
api/java_lang/StrictMath/desc.html#log javasoft.sqe.tests.api.java.lang.StrictMath.log_test
api/java_lang/StrictMath/desc.html#sin javasoft.sqe.tests.api.java.lang.StrictMath.sin_test
api/java_lang/StrictMath/desc.html#tan javasoft.sqe.tests.api.java.lang.StrictMath.tan_test
api/java_lang/StrictMath/index.html#expm1 javasoft.sqe.tests.api.java.lang.StrictMath.expm1Tests -TestCaseID ALL
api/java_lang/StrictMath/index.html#log10 javasoft.sqe.tests.api.java.lang.StrictMath.log10Tests -TestCaseID ALL
api/java_lang/StrictMath/index.html#log1p javasoft.sqe.tests.api.java.lang.StrictMath.log1pTests -TestCaseID ALL
All of them have passed when building with -O3 and -ffp-contract=off (on linuxppc64le).
So thumbs up from my side.
Thanks and best regards,
Martin
-----Original Message-----
From: ppc-aix-port-dev [mailto:ppc-aix-port-dev-bounces at openjdk.java.net] On Behalf Of Volker Simonis
Sent: Mittwoch, 23. November 2016 15:06
To: Gustavo Romero <gromero at linux.vnet.ibm.com>
Cc: build-dev <build-dev at openjdk.java.net>; ppc-aix-port-dev at openjdk.java.net; Java Core Libs <core-libs-dev at openjdk.java.net>; hotspot-dev at openjdk.java.net
Subject: Re: RFR(s) 8170153: PPC64: Poor StrictMath performance due to non-optimized compilation
Hi Gustavo,
thanks a lot for tracking this down!
The change looks good and I a can sponsor it once you get another review from the build group and the FC Extension Request was approved.
In general I'd advise to sign the OCTLA [1] to get access to the Java SE TCK [2] as this contains quite a lot of additional conformance tests which can be quite valuable for changes like this.
Regards,
Volker
[1] http://openjdk.java.net/legal/octla-java-se-8.pdf
[2] http://openjdk.java.net/groups/conformance/JckAccess/
On Tue, Nov 22, 2016 at 1:43 AM, Gustavo Romero <gromero at linux.vnet.ibm.com> wrote:
> Hi,
>
> Could the following change be reviewed, please?
>
> webrev 1/2: http://cr.openjdk.java.net/~gromero/8170153/
> webrev 2/2: http://cr.openjdk.java.net/~gromero/8170153/jdk/
> bug: https://bugs.openjdk.java.net/browse/JDK-8170153
>
> It enables fdlibm optimization on Linux PPC64 LE & BE and hence speeds
> up the StrictMath methods (in some cases up to 3x) on that platform.
>
> On PPC64 fdlibm optimization can be done without precision issues if
> floating-point expression contraction is disable, i.e. if the compiler
> does not use floating-point multiply-add (FMA). For further details
> please refer to gcc
> bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78386
>
> No regression was observed on Math and StrictMath tests:
>
> Passed: java/lang/Math/AbsPositiveZero.java
> Passed: java/lang/Math/Atan2Tests.java
> Passed: java/lang/Math/CeilAndFloorTests.java
> Passed: java/lang/Math/CubeRootTests.java
> Passed: java/lang/Math/DivModTests.java
> Passed: java/lang/Math/ExactArithTests.java
> Passed: java/lang/Math/Expm1Tests.java
> Passed: java/lang/Math/FusedMultiplyAddTests.java
> Passed: java/lang/Math/HyperbolicTests.java
> Passed: java/lang/Math/HypotTests.java
> Passed: java/lang/Math/IeeeRecommendedTests.java
> Passed: java/lang/Math/Log10Tests.java
> Passed: java/lang/Math/Log1pTests.java
> Passed: java/lang/Math/MinMax.java
> Passed: java/lang/Math/MultiplicationTests.java
> Passed: java/lang/Math/PowTests.java
> Passed: java/lang/Math/Rint.java
> Passed: java/lang/Math/RoundTests.java
> Passed: java/lang/Math/SinCosCornerCasesTests.java
> Passed: java/lang/Math/TanTests.java
> Passed: java/lang/Math/WorstCaseTests.java
> Test results: passed: 21
>
> Passed: java/lang/StrictMath/CubeRootTests.java
> Passed: java/lang/StrictMath/ExactArithTests.java
> Passed: java/lang/StrictMath/Expm1Tests.java
> Passed: java/lang/StrictMath/HyperbolicTests.java
> Passed: java/lang/StrictMath/HypotTests.java
> Passed: java/lang/StrictMath/Log10Tests.java
> Passed: java/lang/StrictMath/Log1pTests.java
> Passed: java/lang/StrictMath/PowTests.java
> Test results: passed: 8
>
> and also on the following hotspot tests:
>
> Passed: compiler/intrinsics/mathexact/sanity/AddExactIntTest.java
> Passed: compiler/intrinsics/mathexact/sanity/AddExactLongTest.java
> Passed:
> compiler/intrinsics/mathexact/sanity/DecrementExactIntTest.java
> Passed:
> compiler/intrinsics/mathexact/sanity/DecrementExactLongTest.java
> Passed:
> compiler/intrinsics/mathexact/sanity/IncrementExactIntTest.java
> Passed:
> compiler/intrinsics/mathexact/sanity/IncrementExactLongTest.java
> Passed: compiler/intrinsics/mathexact/sanity/MultiplyExactIntTest.java
> Passed:
> compiler/intrinsics/mathexact/sanity/MultiplyExactLongTest.java
> Passed: compiler/intrinsics/mathexact/sanity/NegateExactIntTest.java
> Passed: compiler/intrinsics/mathexact/sanity/NegateExactLongTest.java
> Passed: compiler/intrinsics/mathexact/sanity/SubtractExactIntTest.java
> Passed:
> compiler/intrinsics/mathexact/sanity/SubtractExactLongTest.java
> Passed: compiler/intrinsics/mathexact/AddExactICondTest.java
> Passed: compiler/intrinsics/mathexact/AddExactIConstantTest.java
> Passed: compiler/intrinsics/mathexact/AddExactILoadTest.java
> Passed: compiler/intrinsics/mathexact/AddExactILoopDependentTest.java
> Passed: compiler/intrinsics/mathexact/AddExactINonConstantTest.java
> Passed: compiler/intrinsics/mathexact/AddExactIRepeatTest.java
> Passed: compiler/intrinsics/mathexact/AddExactLConstantTest.java
> Passed: compiler/intrinsics/mathexact/AddExactLNonConstantTest.java
> Passed: compiler/intrinsics/mathexact/CompareTest.java
> Passed: compiler/intrinsics/mathexact/DecExactITest.java
> Passed: compiler/intrinsics/mathexact/DecExactLTest.java
> Passed: compiler/intrinsics/mathexact/GVNTest.java
> Passed: compiler/intrinsics/mathexact/IncExactITest.java
> Passed: compiler/intrinsics/mathexact/IncExactLTest.java
> Passed: compiler/intrinsics/mathexact/MulExactICondTest.java
> Passed: compiler/intrinsics/mathexact/MulExactIConstantTest.java
> Passed: compiler/intrinsics/mathexact/MulExactILoadTest.java
> Passed: compiler/intrinsics/mathexact/MulExactILoopDependentTest.java
> Passed: compiler/intrinsics/mathexact/MulExactINonConstantTest.java
> Passed: compiler/intrinsics/mathexact/MulExactIRepeatTest.java
> Passed: compiler/intrinsics/mathexact/MulExactLConstantTest.java
> Passed: compiler/intrinsics/mathexact/MulExactLNonConstantTest.java
> Passed: compiler/intrinsics/mathexact/NegExactIConstantTest.java
> Passed: compiler/intrinsics/mathexact/NegExactILoadTest.java
> Passed: compiler/intrinsics/mathexact/NegExactILoopDependentTest.java
> Passed: compiler/intrinsics/mathexact/NegExactINonConstantTest.java
> Passed: compiler/intrinsics/mathexact/NegExactLConstantTest.java
> Passed: compiler/intrinsics/mathexact/NegExactLNonConstantTest.java
> Passed: compiler/intrinsics/mathexact/NestedMathExactTest.java
> Passed: compiler/intrinsics/mathexact/SplitThruPhiTest.java
> Passed: compiler/intrinsics/mathexact/SubExactICondTest.java
> Passed: compiler/intrinsics/mathexact/SubExactIConstantTest.java
> Passed: compiler/intrinsics/mathexact/SubExactILoadTest.java
> Passed: compiler/intrinsics/mathexact/SubExactILoopDependentTest.java
> Passed: compiler/intrinsics/mathexact/SubExactINonConstantTest.java
> Passed: compiler/intrinsics/mathexact/SubExactIRepeatTest.java
> Passed: compiler/intrinsics/mathexact/SubExactLConstantTest.java
> Passed: compiler/intrinsics/mathexact/SubExactLNonConstantTest.java
> Test results: passed: 50
>
> Thank you.
>
>
> Regards,
> Gustavo
>
More information about the ppc-aix-port-dev
mailing list