On Mon, Mar 17, 2014 at 02:36:10PM -0400, William Cohen wrote:
> On 03/17/2014 12:35 PM, Andi Kleen wrote:
> > William Cohen <wco...@redhat.com> writes:
> > 
> >> Has there been any thought about perf supporting function reordering? 
> > 
> > See autofdo http://gcc.gnu.org/wiki/AutoFDO and
> > http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01440.html
> > 
> > It's not in any standard compiler unfortunately.
> > 
> > Standard gcc can do it with profile feedback, but not for the standard 
> > kernel.
> 
> You mean GCC's "-freorder-functions"? That is rather coarse.  According to 
> the link below it only groups functions into hot and cold sections.

No the IPA passes group the whole program by the global callgraph
(either per unit or globally with LTO)
It also has special support for grouping C++ constructors.

> 
> For the kernel code demand paging and iTLB misses are less of an issue.  Is 
> modules code loaded into hugepages or do they use normal sized pages?  If the 
> modules are using normal sized pages, then wouldn't some of the large modules 
> (for example kvm, i915 and nouveau) benefit from function reordering?


Today the modules use small pages.
Some 2.4 kernels put them actually into the direct (2MB) mapping.
That could be done again.

-Andi

-- 
a...@linux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to