Re: [GIT PULL] perf fixes

From: Hagen Paul Pfeifer
Date: Fri Jun 22 2012 - 14:48:45 EST


* Linus Torvalds | 2012-06-22 11:07:01 [-0700]:

>And gcc can (and does, depending on version and details) inline pretty
>much any static function, whether we mark it inline or not.
>
>Now, there's no question that we don't want inlined functions to be
>traced, but that actually means that the *logical* thing would be to
>try to somehow tell gcc to not ever do the whole stupid mcount thing
>for functions that *might* be inlined - and at least be consistent
>about it.
>
>IOW, is there some way to get the mcount thing to only happen for
>functions that either have their address taken, or have external
>visibility?
>
>Because that mcount thing is expensive as hell, if people haven't
>noticed (and I'm not talking about just the call instruction that I
>think we can stub out - it changes code generation in other ways too).
>And it looks like distros enable it by default, which annoys my
>performance-optimizing soul deeply.

Isn't it stubed out already? Already replaced by nops at boot time by
ftrace_code_disable() and friends!? But yes, there may be spots where the
additional mcount() call avoid optimization.

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