bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gprof: function count showing up for only some of my functions


From: isaac
Subject: gprof: function count showing up for only some of my functions
Date: 30 Jul 2002 15:51:30 -0700

Here's something weird, I compiled my gcc program with -pg flags, ran
gprof, and get output that seems reasonable.  However, in the
calls-count column, some but not all of the numbers for my routines
are missing.

  0.22     76.00     0.17        1   170.00  3013.68 
dump_edge_histogram
  0.19     76.15     0.15                             is_rH_edge
  0.15     76.27     0.12   472965     0.00     0.01  edge2hdh
  .
  .
  .
  0.09     77.44     0.07    78008     0.00     0.00  _realbufend
  0.09     77.51     0.07                            
bridge_search_visit
  0.09     77.58     0.07                             dump_diagnostics
  0.09     77.65     0.07                             good_pair
  0.09     77.72     0.07                             search_vgraph

For example, dump_edge_histogram, edge2hdh, dump_diagnostics, and
good_pair are all user-defined functions.   What's mind-blowing is
that dump_edge_histogram is in the same source file as
dump_diagnostics!  They're both called once, both get sampled by
gprof, but only the former gets a function-count tally.

I don't know if this has anything to do with it, but to get it to link
with -pg, I had to include "-lm" twice in the link step;  otherwise
the mysqlclient library complains that "floor" ( a std func in libm )
is undefined.

BTW, I complied all the .o's from scratch with -pg, and then linked
with -pg at the end.

What's wrong?

Isaac



reply via email to

[Prev in Thread] Current Thread [Next in Thread]