public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell Cattelan <cattelan@thebarn.com>
To: David Chinner <dgc@sgi.com>
Cc: Eric Sandeen <sandeen@sandeen.net>, Timothy Shimmin <tes@sgi.com>,
	xfs@oss.sgi.com
Subject: Re: [PATCH 1/2] Make stuff static
Date: Mon, 16 Oct 2006 18:55:43 -0500	[thread overview]
Message-ID: <1161042943.5723.117.camel@xenon.msp.redhat.com> (raw)
In-Reply-To: <20061016232250.GM11034@melbourne.sgi.com>

[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]

On Tue, 2006-10-17 at 09:22 +1000, David Chinner wrote:
> On Mon, Oct 16, 2006 at 04:34:34PM -0500, Eric Sandeen wrote:
> > Eric Sandeen wrote:
> > > Timothy Shimmin wrote:
> > >> Okay, started looking :-)
> > 
> > One other thing, based on the bug on osdl today, some of these larger
> > newly-static functions should probably be marked noinline to keep gcc
> > from doing things we don't want it to...
> 
> <grumble>
> 
> This is not an obvious compiler hint (compared to, say, likely()) as
> the functions gcc automatically inlines changes according to
> compiler version, optimisation level and platform. Hence adding
> noinline notation will be like playing whack-a-mole and I doubt it
> will be consistently used or maintained moving forward. It's the
> wrong solution, IMO.
> 
> I think we should change the definition of STATIC so we don't have
> to poison the code to work around some stupid compiler behaviour.
> That is, unless we specifically say "inline" for static functions,
> we really mean "noinline".
So you are proposing?
/* non-debug */
#define STATIC static inline
/* debug */
#define STATIC noinline

That doesn't sound right that would inline everything that is static
which probably not a good idea in terms of stack usage.

#define STATIC static noinline
?
That doesn't work either ...
STATIC inline 
becomes
static noline inline?


> 
> This will also make debugging easier because we won't get stack
> traces that are apparently missing functions and all the associated
> pain that this can cause.
> 
> Thoughts?
> 
> Cheers,
> 
> Dave.
-- 
Russell Cattelan <cattelan@thebarn.com>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2006-10-16 23:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-29  3:28 [PATCH 1/2] Make stuff static sandeen
2006-10-14  4:31 ` Eric Sandeen
2006-10-16  9:12 ` Timothy Shimmin
2006-10-16 13:49   ` Eric Sandeen
2006-10-16 21:34     ` Eric Sandeen
2006-10-16 23:22       ` David Chinner
2006-10-16 23:55         ` Russell Cattelan [this message]
2006-10-17  0:50           ` David Chinner
2006-10-17  1:03             ` Eric Sandeen
2006-10-17  3:09               ` David Chinner
2006-10-17  3:18                 ` Nathan Scott
2006-10-18  0:56               ` David Chinner
2006-10-17  7:13             ` Tim Shimmin
2006-10-17 21:57               ` David Chinner
2006-10-17 22:45                 ` Russell Cattelan
2006-11-22  0:42                   ` David Chinner
2006-11-22  1:09                     ` Russell Cattelan
2006-11-22  2:16                       ` David Chatterton
2006-11-22  4:24                       ` David Chinner
2006-11-22  4:53                         ` David Chatterton
2006-11-22 16:13                           ` Eric Sandeen
2006-11-29  7:31                           ` David Chinner
2006-11-26 14:05                         ` Eric Sandeen
2006-10-18  4:06                 ` Timothy Shimmin

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=1161042943.5723.117.camel@xenon.msp.redhat.com \
    --to=cattelan@thebarn.com \
    --cc=dgc@sgi.com \
    --cc=sandeen@sandeen.net \
    --cc=tes@sgi.com \
    --cc=xfs@oss.sgi.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