mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Russell King <rmk+lkml@arm.linux.org.uk>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>,
	Git Mailing List <git@vger.kernel.org>,
	Andy Whitcroft <apw@shadowen.org>,
	Dave Hansen <haveblue@us.ibm.com>
Subject: Re: Finding what change broke ARM
Date: Fri, 24 Jun 2005 09:03:11 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0506240824320.11175@ppc970.osdl.org> (raw)
In-Reply-To: <20050624101951.B23185@flint.arm.linux.org.uk>



On Fri, 24 Jun 2005, Russell King wrote:
>
> When building current git for ARM, I see:
> 
>   CC      arch/arm/mm/consistent.o
> arch/arm/mm/consistent.c: In function `dma_free_coherent':
> arch/arm/mm/consistent.c:357: error: `mem_map' undeclared (first use in this function)
> arch/arm/mm/consistent.c:357: error: (Each undeclared identifier is reported only once
> arch/arm/mm/consistent.c:357: error: for each function it appears in.)
> make[2]: *** [arch/arm/mm/consistent.o] Error 1
> 
> How can I find what change elsewhere in the kernel tree caused this
> breakage?

Ahhah! A real-world example of what cool things git can do. 

Anyway, the first starting point is _exactly_ the same as under BK, except 
the syntax is very different, and git does it better, in fact:

	git-whatchanged -p arch/arm/mm/consistent.c

However, in this case nothing has changed in that file over the whole 
git history, so you get an empty answer. Let's go to phase two, but first 
a comment:

> With bk, you could ask for a per-file revision history of the likely
> candidates, and then find the changeset to view the other related
> changes.
> 
> With git... ?  We don't have per-file revision history so...

We don't _store_ changes as per-file revision histories, but we do store 
it in a way where finding out what happened is efficient even per-file. 
While a line-by-line "annotate" is not efficient, the "what changed" 
certainly is.

And git actually does better than BK (or _any_ per-file history thing),
because "git-whatchanged" actually works over directories or multiple
independent files too, and it works purely on pathnames, so you can say
"git-whatchanged" for a file that has gone away to see _why_ it went away.  
In most other systems it's really hard to see what happened to something
that isn't there any more..

Anyway, the problem clearly didn't happen because of any changes to that 
file at all, so here per-file history simply doesn't help. But never fear, 
we're not screwed yet. In particular, you will now obviously suspect that 
since it wasn't that _file_ that changed, and since you know what changed 
in the ARM code, it's going to be a generic linux header file change that 
screwed you over.

So phase #2 is to do

	git-whatchanged -p include/linux

(which shows every commit that touches include/linux, and shows that part
as a patch, thus the "-p"). That starts up a pager on the results by
default, so we just be stupid about it and do a "/mem_map" to look for
changes that mention mem_map. Maybe we'll be lucky.

Even that doesn't show a whole lot: but it does point a very suspicious
finger to the recently merged sparse-mem stuff from Andy Whitcroft,
though.

And now you have a commit to look at, namely the "sparsemem memory model" 
one, commit ID d41dee369bff3b9dcb6328d4d822926c28cc2594.

In fact, looking at it, I think it's simply config option changes, and
probably the SPARSEMEM config option that has preempted your lack of
DISCONTIGMEM support.  But now you have somebody to blame and to ask for
help from: Andy Whitcroft and Dave Hansen, whom I've cc'd.

I might start phase #3 with

	git-whatchanged -p mm/Kconfig arch/arm/Kconfig

but at this point you may already have enough of a clue that you don't 
even care any more.

		Linus

      parent reply	other threads:[~2005-06-24 16:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-24  9:19 Russell King
2005-06-24  9:53 ` Russell King
2005-06-24 10:32   ` Russell King
2005-06-24 12:35     ` Andy Whitcroft
2005-06-24 15:02       ` Dave Hansen
2005-06-24 11:04 ` Matthias Urlichs
2005-06-24 11:32 ` Alecs King
2005-06-24 12:39 ` Petr Baudis
2005-06-24 16:03 ` Linus Torvalds [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=Pine.LNX.4.58.0506240824320.11175@ppc970.osdl.org \
    --to=torvalds@osdl.org \
    --cc=apw@shadowen.org \
    --cc=git@vger.kernel.org \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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

all inboxes | Powered by JetHome®