[PATCH] Add optimization flags for ARM926EJ-S

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Tue Nov 20 11:36:53 UTC 2018


On 2018-11-13 11:14, Boris Ulasevich wrote:

> Hi Jakub,
>
>   I am not against this patch, but I have a few concerns. (1) For me 
> motivation "might increase performance a little bit" is not quite 
> clear. It would be better to have some confidence. (2) Is the 
> particular CPU highly distributed? I am not sure anybody else will get 
> benefit from this change. (3) flags-other.m4 seems not to be a good 
> place to setup -mcpu details.
Just to chime in about the placement of flags. ASFLAGS (flags for the 
assembler) should indeed be set in flags-other.m4, so that part is 
correct. However, maybe the -mcpu (or perhaps the entire 
$ARM_ARCH_TYPE_FLAGS?) should always be set in ASFLAGS, not just for 
this particular flavor of the CPU? We have very little pure assembly 
code, and even less performance data on ARM cpus, so this might be an 
oversight that could be worth fixing.

/Magnus


>
> thanks,
> Boris
>
> On 13.11.2018 2:41, David Holmes wrote:
>> Hi Jakub,
>>
>> Build file changes have to be reviewed on build-dev - cc'd.
>>
>> Thanks,
>> David
>>
>> On 13/11/2018 8:57 AM, Jakub Vaněk wrote:
>>> Hi,
>>>
>>> This patch adds a new ARM ABI option for ARM926EJ-S. The reason is not
>>> because of ABI breakage, but it is because of GCC -mcpu flags
>>> specifically for this CPU. We think that this might increase
>>> performance a little bit. However, we do not have numbers for this.
>>> Alternatively, we may just stick to the arm-sflt ABI option.
>>>
>>> This patch was successfully built with a few other independent patches
>>> here: https://ci.adoptopenjdk.net/view/ev3dev/ ;
>>> https://github.com/ev3dev-lang-java/openjdk-ev3
>>> We haven't run full jtreg tests on the target platform yet, but Juan
>>> Antonio Brena Moral invested his time into Adopt's openjdktests in
>>> QEMU. Also, the JVM seems to run fine on the ARM board itself.
>>>
>>> Regards,
>>>
>>> Jakub Vanek (with credit to Juan Antonio)
>>>
>>> # HG changeset patch
>>> # User Jakub Vaněk <linuxtardis at gmail.com>
>>> # Date 1542060149 -3600
>>> #      Mon Nov 12 23:02:29 2018 +0100
>>> # Node ID 82c5c630ee8f9237b533ba6414143d109dec0180
>>> # Parent  a609d549992a4d094a514a6c0f5b79443192d8bf
>>> Add optimization flags for ARM926EJ-S
>>>
>>> diff --git a/make/autoconf/flags-other.m4 
>>> b/make/autoconf/flags-other.m4
>>> --- a/make/autoconf/flags-other.m4
>>> +++ b/make/autoconf/flags-other.m4
>>> @@ -119,6 +119,10 @@
>>>     # Misuse EXTRA_CFLAGS to mimic old behavior
>>>     $2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS ${$2EXTRA_CFLAGS}"
>>>
>>> +  if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm926ejs; then
>>> +    $2JVM_ASFLAGS="$JVM_BASIC_ASFLAGS -mcpu=arm926ej-s"
>>> +  fi
>>> +
>>>     AC_SUBST($2JVM_ASFLAGS)
>>>   ])
>>>
>>> diff --git a/make/autoconf/flags.m4 b/make/autoconf/flags.m4
>>> --- a/make/autoconf/flags.m4
>>> +++ b/make/autoconf/flags.m4
>>> @@ -34,7 +34,7 @@
>>>   AC_DEFUN([FLAGS_SETUP_ABI_PROFILE],
>>>   [
>>>     AC_ARG_WITH(abi-profile, [AS_HELP_STRING([--with-abi-profile],
>>> -      [specify ABI profile for ARM builds
>>> (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
>>> armv5-vfp-sflt,armv6-vfp-hflt,aarch64) @<:@toolchain dependent@:>@
>>> ])])
>>> +      [specify ABI profile for ARM builds
>>> (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
>>> arm926ejs,armv5-vfp-sflt,armv6-vfp-hflt,aarch64) @<:@toolchain
>>> dependent@:>@ ])])
>>>
>>>     if test "x$with_abi_profile" != x; then
>>>       if test "x$OPENJDK_TARGET_CPU" != xarm && \
>>> @@ -55,6 +55,9 @@
>>>       elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
>>>         ARM_FLOAT_TYPE=sflt
>>>         ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
>>> +    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm926ejs; then
>>> +      ARM_FLOAT_TYPE=sflt
>>> +      ARM_ARCH_TYPE_FLAGS='-mcpu=arm926ej-s -marm'
>>>       elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
>>>         ARM_FLOAT_TYPE=vfp-sflt
>>>         ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
>>>



More information about the build-dev mailing list