Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

gprof: gmon.out file is missing call-graph data (-pg)

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
zoharl3
Posts: 12
Joined: 2006-05-25 14:07

gprof: gmon.out file is missing call-graph data (-pg)

#1 Post by zoharl3 »

I have this problem with gprof:

test.c:
-------

#include <stdio.h>

int main()
{
printf("hello world\n");

return 0;
};



makefile:
-----------
test: test.c
cc -g -c test.c -pg
cc -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

could you recommend me of another profiler?

Thanks
Last edited by zoharl3 on 2006-06-02 21:12, edited 1 time in total.

zoharl3
Posts: 12
Joined: 2006-05-25 14:07

#2 Post by zoharl3 »

Guys,

Am I missing something here? Are profilers not in use? Do you have an idea where I can ask about it, because I have no one to ask at GNU.

Thanks

bmenrigh
Posts: 1
Joined: 2006-06-11 07:25

Need functions

#3 Post by bmenrigh »

gprof profiles functions -- you don't have any (main doesn't count). Add a function that does the print and then profile your code, gmon.out will then have a call-graph.

zoharl3
Posts: 12
Joined: 2006-05-25 14:07

#4 Post by zoharl3 »

Thanks!

Post Reply