[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200804221233.50360.vda.linux@googlemail.com>
Date: Tue, 22 Apr 2008 12:33:50 +0200
From: Denys Vlasenko <vda.linux@...glemail.com>
To: Jakub Jelinek <jakub@...hat.com>
Cc: Eric Sandeen <sandeen@...deen.net>, David Chinner <dgc@....com>,
Adrian Bunk <bunk@...nel.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Shawn Bohrer <shawn.bohrer@...il.com>,
Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Arjan van de Ven <arjan@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] xfs: do not pass unused params to xfs_flush_pages
On Tuesday 22 April 2008 11:56, Jakub Jelinek wrote:
> On Tue, Apr 22, 2008 at 10:57:33AM +0200, Denys Vlasenko wrote:
> > You do not see reduced stack usage in "make checkstack",
> > because "make checkstack" shows only stack usage caused by
> > local variables (it analyses sub %esp,NN instructions which
> > make room for them). Parameters also take up stack, but
> > they are pushed on stack with push instruction,
> > and so are invisible in "make checkstack" output.
>
> That on i?86 actually depends on whether -maccumulate-outgoing-args
> is on or off (the default is off for -Os and most pre-i686 tunings,
> and on for i686 and most post-i686 tunings when not -Os).
I trust you know it better than I.
I removed a few parameters of non-static, non-inline function.
Since at call site gcc has no way of knowing that these parameters
will not be used by callee, and the function is not regparm
(explicitly or implicitly by being static), I am fairly sure
gcc is putting these parameters on stack.
"make checkstack" doesn't see any difference. It can only
mean that "make checkstack" does not account for stack space
taken by parameters, not that there is no difference
in stack usage after this change. That is simply not possible IMO.
--
vda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists