* gprof: gmon.out file is missing call-graph data (I'm using -pg)
@ 2006-06-04 15:39 Zohar Levi
2006-06-04 17:45 ` Brian Dessent
0 siblings, 1 reply; 2+ messages in thread
From: Zohar Levi @ 2006-06-04 15:39 UTC (permalink / raw)
To: gcc-help
I have this problem with gprof:
test.c:
-------
#include <stdio.h>
int main()
{
printf("hello world\n");
return 0;
};
makefile:
-----------
test: test.c
gcc -g -c test.c -pg
gcc -o test test.o -pg
when I run test it generates the gmon.out, but gprof
complains:
gprof: gmon.out file is missing call-graph data
Is there another maintained profiler?
Thanks
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gprof: gmon.out file is missing call-graph data (I'm using -pg)
2006-06-04 15:39 gprof: gmon.out file is missing call-graph data (I'm using -pg) Zohar Levi
@ 2006-06-04 17:45 ` Brian Dessent
0 siblings, 0 replies; 2+ messages in thread
From: Brian Dessent @ 2006-06-04 17:45 UTC (permalink / raw)
To: Zohar Levi; +Cc: gcc-help
Zohar Levi wrote:
> when I run test it generates the gmon.out, but gprof
> complains:
>
> gprof: gmon.out file is missing call-graph data
It's complaining because there is no call-graph info because your
trivial testcase only has a single function. If you run it on a
non-trivial testcase, or if you ask for a flat profile (-p) it will work
fine.
The following thread explains the problem and includes a patch which
changes the default behavior in this situation to -p. Note that gprof
is part of binutils and not part of gcc and questions about it are
better suited for the binutils list.
http://sourceware.org/ml/binutils/2006-04/msg00421.html
Brian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-04 17:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-04 15:39 gprof: gmon.out file is missing call-graph data (I'm using -pg) Zohar Levi
2006-06-04 17:45 ` Brian Dessent
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).