This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r198322 - in /branches/google/gcc-4_7: function...
- From: tmsriram at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Thu, 25 Apr 2013 22:02:49 -0000
- Subject: r198322 - in /branches/google/gcc-4_7: function...
Author: tmsriram
Date: Thu Apr 25 22:02:48 2013
New Revision: 198322
URL: http://gcc.gnu.org/viewcvs?rev=198322&root=gcc&view=rev
Log:
This patch brings the following to the linker function reordering plugin
present in gcc-4_7
* Node profiles: Callgraph node profiles from the compiler are passed to the
linker plugin. The node profiles are passed as bb entry count and max count
of the corresponding function. The max count of the split cold function is
also passed when present.
* With this patch, the plugin will sorts all sections that are not grouped by
the plugin's callgraph according to their node weights.
* New flags to the plugin to control the following:
a) sort_name_prefix=<yes|no>: This is off by default. When this is on, the
plugin groups sections by their section name prefix.
b) use_maxcount=<yes|no>: This is on by default. This uses the max of
max_count and the node weights as the actual node weight of a function. When
this is off, the entry count is used as the node weight.
c) edge_cutoff=<a|p><value>: This can used to prune away cold callgraph
edges from the linker plugin constructed callgraph. It can be expressed as
a percent of the max edge value, ex: p25 for 25% or an absolute value,
ex: a15000. The default is to consider all edges to be in the callgraph.
d) unlikely_segment_cutoff=<value>: This decides the profile threshold below
which functions should be considered unlikely. The default is zero. This is
useful when splitting unlikely functions into a separate ELF segment using the
gold linker.
I have added the capability to pass the split cold function weight to the plugin
but the actual layout of split cold functions in the plugin will be done as a
follow-up patch.
Added:
branches/google/gcc-4_7/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_1.C
branches/google/gcc-4_7/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_2.C
branches/google/gcc-4_7/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_3.C
branches/google/gcc-4_7/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_4.C
branches/google/gcc-4_7/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_5.C
branches/google/gcc-4_7/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_6.C
branches/google/gcc-4_7/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_7.C
branches/google/gcc-4_7/gcc/testsuite/g++.dg/tree-prof/func_reorder_gold_plugin_8.C
Removed:
branches/google/gcc-4_7/gcc/testsuite/g++.dg/tree-prof/callgraph-profiles.C
Modified:
branches/google/gcc-4_7/function_reordering_plugin/callgraph.c
branches/google/gcc-4_7/function_reordering_plugin/callgraph.h
branches/google/gcc-4_7/function_reordering_plugin/function_reordering_plugin.c
branches/google/gcc-4_7/gcc/final.c