poky.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* [poky] gcc11.3 (?) optimization performance problems
@ 2022-11-23 17:28 Steve
  2022-11-23 19:52 ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Steve @ 2022-11-23 17:28 UTC (permalink / raw)
  To: poky

Hello, I switched my poky distro (and SDK to compile) to 4.0.5 - running
an CortexA53 with 4 cores (before it was 4.0.0 I think).
My test application simple average over an array of 5 million bytes
takes now around 8 times as long as before.

What is changed is gcc from 11.2 to 11.3. Can this be the reason?
Compiler options, eg -O3 keeps same. Is there indeed a regression?

The speed neither depends on rootfs nor kernel. Just the compiler/SDK
decides wether the compiled app is fast or slow.

Best regards, Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [poky] gcc11.3 (?) optimization performance problems
  2022-11-23 17:28 [poky] gcc11.3 (?) optimization performance problems Steve
@ 2022-11-23 19:52 ` Khem Raj
  2022-11-24  8:12   ` Steve
       [not found]   ` <172A77114EC2E04B.11309@lists.yoctoproject.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Khem Raj @ 2022-11-23 19:52 UTC (permalink / raw)
  To: Steve; +Cc: poky

On Wed, Nov 23, 2022 at 9:28 AM Steve <star@gmx.li> wrote:
>
> Hello, I switched my poky distro (and SDK to compile) to 4.0.5 - running
> an CortexA53 with 4 cores (before it was 4.0.0 I think).
> My test application simple average over an array of 5 million bytes
> takes now around 8 times as long as before.
>
> What is changed is gcc from 11.2 to 11.3. Can this be the reason?

It can be. However we need to narrow it down. So perhaps just revert
the 11.3 upgrade
and leave everything else at yocto 4.0.5 and see if the behavior is regressed.

> Compiler options, eg -O3 keeps same. Is there indeed a regression?
>
> The speed neither depends on rootfs nor kernel. Just the compiler/SDK
> decides wether the compiled app is fast or slow.

Right, there could be other factors as well. We do change other packages too in
minor releases and it could be one of these which might have caused the issue
as well but its better to go one by one.

>
> Best regards, Steve
>
> 
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [poky] gcc11.3 (?) optimization performance problems
  2022-11-23 19:52 ` Khem Raj
@ 2022-11-24  8:12   ` Steve
       [not found]   ` <172A77114EC2E04B.11309@lists.yoctoproject.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Steve @ 2022-11-24  8:12 UTC (permalink / raw)
  To: Khem Raj; +Cc: poky

Am 23.11.22 um 20:52 schrieb Khem Raj:
> On Wed, Nov 23, 2022 at 9:28 AM Steve <star@gmx.li> wrote:
>>
>> Hello, I switched my poky distro (and SDK to compile) to 4.0.5 - running
>> an CortexA53 with 4 cores (before it was 4.0.0 I think).
>> My test application simple average over an array of 5 million bytes
>> takes now around 8 times as long as before.
>>
>> What is changed is gcc from 11.2 to 11.3. Can this be the reason?
>
> It can be. However we need to narrow it down. So perhaps just revert
> the 11.3 upgrade
> and leave everything else at yocto 4.0.5 and see if the behavior is regressed.

Building a SDK takes some time... seems I am wasting time building 4.0.1
(gcc 11.2) and 4.0.5 (gcc11.3) clean again.

I am not good in analyzing files, but compare the strings in my test
binary tell me two differences: GNU AS 3.7 vs 3.8 and glibc 2.34-r0 vs
2.35-r0 (one is done with my "fast" SDK the other with 4.0.1)

Digging into details, my "fast" SDK was created in yocto 3.4 (not as
assumed in 4.0)

How can I test that, simply exchange the binutils-recipe? Will that
work? Can I really mix that version?
How to do that 'revert'? Just copy a gcc recipe from an older or newer
version? Finally it is not the compiler, but the cross compiler, right?


>> Compiler options, eg -O3 keeps same. Is there indeed a regression?
>>
>> The speed neither depends on rootfs nor kernel. Just the compiler/SDK
>> decides wether the compiled app is fast or slow.
>
> Right, there could be other factors as well. We do change other packages too in
> minor releases and it could be one of these which might have caused the issue
> as well but its better to go one by one.
>




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [poky] gcc11.3 (?) optimization performance problems
       [not found]   ` <172A77114EC2E04B.11309@lists.yoctoproject.org>
@ 2022-11-25  6:30     ` Steve
  0 siblings, 0 replies; 4+ messages in thread
From: Steve @ 2022-11-25  6:30 UTC (permalink / raw)
  To: poky

Am 24.11.22 um 09:12 schrieb Steve:
> Am 23.11.22 um 20:52 schrieb Khem Raj:
>> On Wed, Nov 23, 2022 at 9:28 AM Steve <star@gmx.li> wrote:
>>>
>>> Hello, I switched my poky distro (and SDK to compile) to 4.0.5 - running
>>> an CortexA53 with 4 cores (before it was 4.0.0 I think).
>>> My test application simple average over an array of 5 million bytes
>>> takes now around 8 times as long as before.
>>>
>>> What is changed is gcc from 11.2 to 11.3. Can this be the reason?
>>
>> It can be. However we need to narrow it down. So perhaps just revert
>> the 11.3 upgrade
>> and leave everything else at yocto 4.0.5 and see if the behavior is
>> regressed.
>
> Building a SDK takes some time... seems I am wasting time building 4.0.1
> (gcc 11.2) and 4.0.5 (gcc11.3) clean again.
>
> I am not good in analyzing files, but compare the strings in my test
> binary tell me two differences: GNU AS 3.7 vs 3.8 and glibc 2.34-r0 vs
> 2.35-r0 (one is done with my "fast" SDK the other with 4.0.1)
>
> Digging into details, my "fast" SDK was created in yocto 3.4 (not as
> assumed in 4.0)
>
> How can I test that, simply exchange the binutils-recipe? Will that
> work? Can I really mix that version?
> How to do that 'revert'? Just copy a gcc recipe from an older or newer
> version? Finally it is not the compiler, but the cross compiler, right?
>
>
>>> Compiler options, eg -O3 keeps same. Is there indeed a regression?
>>>
>>> The speed neither depends on rootfs nor kernel. Just the compiler/SDK
>>> decides wether the compiled app is fast or slow.
>>
>> Right, there could be other factors as well. We do change other
>> packages too in
>> minor releases and it could be one of these which might have caused
>> the issue
>> as well but its better to go one by one.

Based on 4.0.5 I reverted first gcc recipe to what was in 3.4 and in a
second step binutuil.
The result keeps same. I am clueless and need your help please what to
check next. Any optimization that works only on a certain kernel that I
don't use maybe?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-25  6:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-23 17:28 [poky] gcc11.3 (?) optimization performance problems Steve
2022-11-23 19:52 ` Khem Raj
2022-11-24  8:12   ` Steve
     [not found]   ` <172A77114EC2E04B.11309@lists.yoctoproject.org>
2022-11-25  6:30     ` Steve

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).