Messages in this thread | | | Date | Mon, 12 May 1997 14:09:20 +0200 (MET DST) | From | Ingo Molnar <> | Subject | Re: sockfd_lookup |
| |
On Sun, 11 May 1997, David S. Miller wrote:
> From: Eric.Schenk@dna.lth.se > Date: Sun, 11 May 1997 00:03:24 +0200 > > The "extern __inline__" form gets used when you want to have a bit of > inlined code that never appears as a callable routing itself. You just > need to make sure you have optimization turned on or it won't work. > > You can "get around" this by using "static __inline__". In this case > if GCC has inlined it everywhere, it will not output the function. > But in the cases where it cannot (or will not, when optimization is > not turned on) You get a copy in every file which calls that function.
Sometimes is necessary to have this effect, say to get such granularity crash logs:
Trace: c0123481 <atomic_dec+d/18> Trace: c0123611 <atomic_inc+d/18> Trace: c01234bd <hardirq_trylock+11/90> Trace: c012349c <get_esp+10/20> Trace: c012341c <do_bottom_half+10/68> Trace: c010c9d1 <release_irqlock+d/30> Trace: c010ce51 <atomic_dec+d/18> Trace: c010cca2 <hardirq_exit+e/2c> Trace: c010cab2 <irq_exit+e/24> Trace: c010ca01 <__outbc+d/1c> Trace: c010cccd <set_irq_mask+d/38> Trace: c010cc29 <clear_bit+d/20>
it's pretty handy sometimes to see every single action in the kernel. Too bad that GCC produces _huge_ amount of warnings, if such a static inlined function is defined, but not used.
plus, there are a few things that pop up, say does anyone know why fs/locks.c has locks_verify_locked() defined, and fs.h too, but as extern inline?
-- mingo
| |