Linus Torvalds <[email protected]> writes:
> 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.
Right.
> - Gcc can suck at big functions with lots of local variables. A
> function call can be _cheaper_ than trying to inline a function,
> regardless of whether it's called once or many times. I've seen
> functions that had several silly (and unnecessary) spills suddenly
> become quite readable when they were separate functions.
OTOH inlining helps much if both the caller and the called share the
same variables (values, calculated the same way from the same arguments).
--
Krzysztof Halasa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]