Message ID | CAAs8Hmz4kRG0UT6gLCy4BD+d9qco7TQccJpDm4q4CmADjsWpUQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
Ok. David On Tue, Nov 26, 2013 at 6:44 PM, Sriraman Tallam <tmsriram@google.com> wrote: > Google ref b/11631232 > > With AutoFDO, the .gnu.callgraph sections are not emitted with option > -freorder-functions=callgraph. This simple patch fixes it. > > Index: final.c > =================================================================== > --- final.c (revision 205418) > +++ final.c (working copy) > @@ -4471,7 +4471,7 @@ > /* With -fcallgraph-profiles-sections and -freorder-functions=, > add ".gnu.callgraph.text" section for storing profiling information. */ > if ((flag_reorder_functions > 1) > - && flag_profile_use > + && (flag_profile_use || flag_auto_profile) > && cgraph_get_node (current_function_decl) != NULL > && ((cgraph_get_node (current_function_decl))->callees != NULL > || (cgraph_get_node (current_function_decl))->count > 0)) > > Ok to commit? > > Sri
Index: final.c =================================================================== --- final.c (revision 205418) +++ final.c (working copy) @@ -4471,7 +4471,7 @@ /* With -fcallgraph-profiles-sections and -freorder-functions=, add ".gnu.callgraph.text" section for storing profiling information. */ if ((flag_reorder_functions > 1) - && flag_profile_use + && (flag_profile_use || flag_auto_profile) && cgraph_get_node (current_function_decl) != NULL && ((cgraph_get_node (current_function_decl))->callees != NULL || (cgraph_get_node (current_function_decl))->count > 0))