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

Need help with C, C++, perl, python, etc?

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

Postby zoharl3 » 2006-05-28 11:13

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

Postby zoharl3 » 2006-06-02 21:06

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
zoharl3
 
Posts: 12
Joined: 2006-05-25 14:07

Need functions

Postby bmenrigh » 2006-06-11 09:00

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.
bmenrigh
 
Posts: 1
Joined: 2006-06-11 07:25

Postby zoharl3 » 2006-06-27 10:31

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


Return to Programming

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable