In gcc:profile.c, the variable total_num_edges_instrumented used is initialized to 0, but never increased. Hence end_branch_prob (which gets called when one dumps the intermediate *.profile file via the "-fdump-tree-all" option) always prints "Total number of instrumented edges: 0" The following patch should fix this:
Index: gcc/profile.c =================================================================== --- gcc/profile.c (revision 126075) +++ gcc/profile.c (working copy) @@ -916,6 +916,8 @@ if (dump_file) fprintf (dump_file, "%d ignored edges\n", ignored_edges); + total_num_edges_instrumented += num_instrumented; + /* Write the data from which gcov can reconstruct the basic block graph. */ -- Summary: Gcov: profile.c total_num_edges_instrumented never incremented (patch included) Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: trivial Priority: P3 Component: gcov-profile AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hbl at sysgo dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32543