public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Marek <mmarek@suse.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: "Stephen Boyd" <sboyd@codeaurora.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	"Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>,
	linux-kbuild@vger.kernel.org, "Nicolas Pitre" <nico@fluxnic.net>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Måns Rullgård" <mans@mansr.com>
Subject: Re: [PATCH v2 1/2] scripts: Add a recorduidiv program
Date: Mon, 30 Nov 2015 16:40:25 +0100	[thread overview]
Message-ID: <565C6DE9.2020302@suse.com> (raw)
In-Reply-To: <20151130153208.GR8644@n2100.arm.linux.org.uk>

On 2015-11-30 16:32, Russell King - ARM Linux wrote:
> On Mon, Nov 30, 2015 at 04:11:16PM +0100, Michal Marek wrote:
>> On 2015-11-26 00:47, Russell King - ARM Linux wrote:
>>> On Wed, Nov 25, 2015 at 01:51:03PM -0800, Stephen Boyd wrote:
>>>> The ARM compiler inserts calls to __aeabi_uidiv() and
>>>> __aeabi_idiv() when it needs to perform division on signed and
>>>> unsigned integers. If a processor has support for the udiv and
>>>> sdiv division instructions the calls to these support routines
>>>> can be replaced with those instructions. Therefore, record the
>>>> location of calls to these library functions into two sections
>>>> (one for udiv and one for sdiv) similar to how we trace calls to
>>>> mcount. When the kernel boots up it will check to see if the
>>>> processor supports the instructions and then patch the call sites
>>>> with the instruction.
>>>
>>> Do we have any resolution on these programs which modify the object
>>> files in-place, rather than breaking any hard-links which may be
>>> present (eg, as a result of using ccache in hard-link mode) ?
>>
>> Good point, but I do not think anybody is using CCACHE_HARDLINK with the
>> kernel.
> 
> That's wrong then, because I've been using it for a very long time with
> my nightly builds. :)  Therefore, there is somebody!

OK.


>> As the manpage says, it is going to confuse make, so the time
>> saved by ccache would be offset by make trying to recompile all *.c
>> files each time.
> 
> From what I've noticed, it makes a big difference when running nightly
> builds.  My nightly builds use O= and always build into an empty target
> tree, so there are no old objects back-dated to confuse make.
> 
> Even if there were, make would spot that the object is older than the
> source, and try to re-make the target again, at which point ccache
> would re-hardlink the object after looking up the hashed preprocessed
> source.

That's what I meant. If you do a second make in a freshly built tree, it
will recompile all the files again. It will all be cache hits, but each
of the will be lot slower than comparing two timestamps. But in
throwaway build trees you do not care, I haven't considered that...

Michal

  reply	other threads:[~2015-11-30 15:40 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25 21:51 [PATCH v2 0/2] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions Stephen Boyd
2015-11-25 21:51 ` [PATCH v2 1/2] scripts: Add a recorduidiv program Stephen Boyd
2015-11-25 23:47   ` Russell King - ARM Linux
2015-11-30 15:11     ` Michal Marek
2015-11-30 15:32       ` Russell King - ARM Linux
2015-11-30 15:40         ` Michal Marek [this message]
2015-12-01 16:07           ` Michal Marek
2015-12-01 16:19             ` Russell King - ARM Linux
2015-12-01 16:43               ` Michal Marek
2015-12-01 16:49               ` Steven Rostedt
2015-12-01 17:10                 ` Russell King - ARM Linux
2015-12-01 17:22                   ` Steven Rostedt
2015-12-01 18:16                     ` Russell King - ARM Linux
2015-12-01 21:39                       ` Michal Marek
2015-12-02 10:23                       ` Russell King - ARM Linux
2015-12-02 14:05                         ` Steven Rostedt
     [not found]                           ` <E1a7MVT-0000et-62@rmk-PC.arm.linux.org.uk>
2015-12-11 14:31                             ` [PATCH] scripts: recordmcount: break hardlinks Steven Rostedt
2015-12-11 14:45                               ` Russell King - ARM Linux
2015-12-11 15:08                                 ` Steven Rostedt
2015-12-11 18:10                                 ` Steven Rostedt
2015-12-11 18:33                                   ` Russell King - ARM Linux
2015-12-11 18:51                                     ` Steven Rostedt
2015-12-11 18:58                                       ` Russell King - ARM Linux
2015-12-11 19:28                                         ` Steven Rostedt
2015-11-25 21:51 ` [PATCH v2 2/2] ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructions Stephen Boyd
2015-11-25 23:09   ` Nicolas Pitre
2015-11-26  0:05     ` Russell King - ARM Linux
2015-11-26  0:07     ` Måns Rullgård
2015-11-26  0:44       ` Nicolas Pitre
2015-11-26  0:50         ` Måns Rullgård
2015-11-26  1:28           ` Russell King - ARM Linux
2015-11-26  2:19             ` Måns Rullgård
2015-11-26  5:32               ` Nicolas Pitre
2015-11-26 12:41                 ` Måns Rullgård
2015-11-26  0:08   ` Russell King - ARM Linux

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=565C6DE9.2020302@suse.com \
    --to=mmarek@suse.com \
    --cc=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mans@mansr.com \
    --cc=nico@fluxnic.net \
    --cc=rostedt@goodmis.org \
    --cc=sboyd@codeaurora.org \
    --cc=thomas.petazzoni@free-electrons.com \
    /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