lkml.org 
[lkml]   [2006]   [Jan]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 00/2] improve .text size on gcc 4.0 and newer compilers

* Linus Torvalds <torvalds@osdl.org> wrote:

> > For example, I add "inline" for static functions which are only called
> > from one place.
>
> That's actually not a good practice. Two reasons:
>
> - debuggability goes way down. Oops reports give a much nicer call-chain
> and better locality for uninlined code.

yes, and to improve debuggability, i often do this at the top of
debugged .c modules:

#undef inline
#define inline

to get good stacktraces. So debuggability is i think another argument to
further decouple 'inline' from 'always inline' - so a global .config
DEBUG_ option could turn all inlines into real function calls. (we
already have CONFIG_FRAME_POINTERS to improve stack-trace output, at the
price of slightly slower code.)

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-02 21:15    [W:0.577 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site