This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[google][4_7] Function reordering plugin enhancements


Hi,

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 entry 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.

Handling split cold functions in the plugin will be done as a follow-up patch.

Teresa, could you please review?

Thanks
Sri

Attachment: function_reordering_patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]