[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gprof 2.10.1 bug
From: |
Petter Reinholdtsen |
Subject: |
gprof 2.10.1 bug |
Date: |
Thu, 14 Dec 2000 18:50:14 +0100 |
I discovered this bug using gprof 2.9.5 on GNU/Debian Linux, but it
seem to be present in 2.10.1 as well.
I am running 'gprof -c -z' to get the call graph, and discovered a
bug. If there are more then 9999 functions, the function index is
printed like '[10000 ', not '[10000] ', and the parser I am testing to
generate a complete call graph fails.
I believe the bug is in gprof/cg_print.c, function print_line().
There I find this construct:
sprintf (buf, "[%d]", np->cg.index);
printf (bsd_style_output
? "%-6.6s %5.1f %7.2f %11.2f"
: "%-6.6s %5.1f %7.2f %7.2f", buf,
100 * (np->cg.prop.self + np->cg.prop.child) / print_time,
np->cg.prop.self / hz, np->cg.prop.child / hz);
If the buffer string is more then 6 characters, the string is
truncated. I'm not sure how this should be solved, as it is not clear
to me if the string need to stay shorter then 6 characters to match
some fixed format.
The call graph program is available from
<URL:http://www.ida.liu.se/~vaden/cgdi/>.
--
##> Petter Reinholdtsen <## | address@hidden
O- <SCRIPT Language="Javascript">window.close()</SCRIPT>
http://www.hungry.com/~pere/ | Go Mozilla, go! Go!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gprof 2.10.1 bug,
Petter Reinholdtsen <=