aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/gcc/final.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.6/gcc/final.c')
-rw-r--r--gcc-4.6/gcc/final.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc-4.6/gcc/final.c b/gcc-4.6/gcc/final.c
index 44282c9..da45e68 100644
--- a/gcc-4.6/gcc/final.c
+++ b/gcc-4.6/gcc/final.c
@@ -4333,7 +4333,7 @@ debug_free_queue (void)
/* List the call graph profiled edges whise value is greater than
PARAM_NOTE_CGRAPH_SECTION_EDGE_THRESHOLD in the
- ".note.callgraph.text" section. */
+ "gnu.callgraph.text" section. */
static void
dump_cgraph_profiles (void)
{
@@ -4421,14 +4421,15 @@ rest_of_handle_final (void)
decl_fini_priority_lookup
(current_function_decl));
- /* With -fcgraph-section, add ".note.callgraph.text" section for storing
- profiling information. */
+ /* With -fcallgraph-profiles-sections, add ".gnu.callgraph.text" section
+ for storing profiling information. */
if (flag_callgraph_profiles_sections
&& flag_profile_use
- && cgraph_node (current_function_decl) != NULL)
+ && cgraph_node (current_function_decl) != NULL
+ && (cgraph_node (current_function_decl))->callees != NULL)
{
- flags = SECTION_DEBUG;
- asprintf (&profile_fnname, ".note.callgraph.text.%s", fnname);
+ flags = SECTION_DEBUG | SECTION_EXCLUDE;
+ asprintf (&profile_fnname, ".gnu.callgraph.text.%s", fnname);
switch_to_section (get_section (profile_fnname, flags, NULL));
fprintf (asm_out_file, "\t.string \"Function %s\"\n", fnname);
dump_cgraph_profiles ();