public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Moessbauer, Felix (T CED SES-DE)" <felix.moessbauer@siemens.com>,
	Uladzimir Bely <ubely@ilbers.de>,
	isar-users <isar-users@googlegroups.com>
Subject: Re: next: ccache broken for cross-compiling
Date: Thu, 14 Jul 2022 16:44:17 +0200	[thread overview]
Message-ID: <e4d94bec-708f-9965-7aab-796dda5ca238@siemens.com> (raw)
In-Reply-To: <AM9PR10MB4869ADB3A8EFF778E3AC252C89889@AM9PR10MB4869.EURPRD10.PROD.OUTLOOK.COM>

On 14.07.22 15:51, Moessbauer, Felix (T CED SES-DE) wrote:
>> -----Original Message-----
>> From: isar-users@googlegroups.com <isar-users@googlegroups.com> On
>> Behalf Of Uladzimir Bely
>> Sent: Thursday, July 14, 2022 3:41 PM
>> To: isar-users <isar-users@googlegroups.com>
>> Cc: Kiszka, Jan (T CED) <jan.kiszka@siemens.com>
>> Subject: Re: next: ccache broken for cross-compiling
>>
>> In the email from Sunday, 10 July 2022 23:51:14 +03 user Jan Kiszka wrote:
>>> Hi all,
>>>
>>> I've noticed that ccache is not doing its job with current next when
>>> cross-building, e.g. mc:qemuarm64-bullseye:linux-mainline. It does
>>> work as expected for native builds
>>> (mc:qemuamd64-bullseye:linux-mainline),
>>> and it works fine with v0.9. Seems like an sbuild regression.
>>>
>>> Jan
>>
>> I did some checks on my side and it seems that it is not related to cross- build,
>> but mostlry related to something specific to sbuild and kernel.
>>
>> Just some statistics (taken from 'ccache -s' output)
>>
>> 1. 'hello' cross-build for 'arm64' on 'next' branch (with sbuild)
>>
>> First run:
>>   Hits:             415 / 7479 (5.55 %)
>>
>> Second run:
>>   Hits:            7353 / 14958 (49.16 %)
>>
>> Everything OK, most of requests are hits ((7353 - 415) / 7479 = 92.7%)
>>
>> 2. 'linux-mainline' cross build for 'arm64' on 'next' branch (with sbuild)
>>
>> First run:
>>   Hits:             262 / 6208 (4.22 %)
>>
>> Second run:
>>   Hits:              644 / 12416 (5.19 %)
>>
>> Cache usage is relatively low ((644 - 262) / 6208 = 5.3%) compared to 'hello'
>>
>> 3. 'linux-mainline' native build for 'arm64' on 'next' branch (with sbuild)
>>
>> First run:
>>   Hits:             262 / 6208 (4.22 %)
>>
>> Second run:
>>   Hits:              644 / 12416 (5.19 %)
>>
>> The result is the same as for cross-build ((644 - 262) / 6208 = 5.3%), so the low
>> cache usage problem is not related to cross or native build type.
>>
>> 4. 'linux-mainline' native build for 'arm64' on 'master' branch (without
>> sbuild)
>>
>> First run:
>>   Hits:             262 / 6208 (4.22 %)
>>
>> Second run:
>>   Hits:            6469 / 12416 (52.10 %)
>>
>> Here, ccache usage is high ((6469 - 262) / 6208 = 99.98%)
>>
>> Most probably, Henning's assumption regarding inclusion of debug information
>> (with different absolute paths in case of sbuild) making binaries in cache
>> 'incompatible' is true.
> 
> At least when I had the issue, the debug information was the root cause for low cache hits.
> But instead of guessing, it is better to simply enable the CCache debug mode and look into the generated debug files.
> There it is easy to spot the problems.

The probability that this effect is rather related to CONFIG_DEBUG_INFO
than cross-compile is high. We use the defconfigs for the archs, and x86
happen to have that off while arm64 has it on. Worth to check that trace
first.

> 
> Yesterday, I sent a patch on the ML to enable the debug mode in ISAR.
> 
> BTW: the kernel's debug information not necessarily has to be disabled.
> You can also fiddle in the KCFLAG -fdebug-prefix-map=

...and then this may become relevant, indeed.

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux

      reply	other threads:[~2022-07-14 14:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-10 20:51 Jan Kiszka
2022-07-12 14:20 ` Henning Schild
2022-07-13  5:22   ` Jan Kiszka
2022-07-14 13:41 ` Uladzimir Bely
2022-07-14 13:51   ` Moessbauer, Felix
2022-07-14 14:44     ` Jan Kiszka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e4d94bec-708f-9965-7aab-796dda5ca238@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=felix.moessbauer@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=ubely@ilbers.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox