Using gprof on gnome-games ?



Hi all,

I was trying to build some of the gnome-games so that I could profile the code using gprof. I modified the Makefile locally to add "-pg" to both the CFLAGS and LD_FLAGS, since gprof documentation tells me the code must be both compiled and linked with the -pg switch. When I run a game, it creates a file gmon.out, as I'd expect, but if I try to run gprof on that file, I see this error:
gprof: gmon.out file is missing call-graph data

And indeed, od of the gmon.out file shows it is almost entirely filled with 0s. I tried adding -pg to both a simple test program on my box and another home project I have that was built with glade, and in those cases I get a call graph. But with each of the two gnome-games I attempted, gtali and mahjongg I generate gmon.out but gprof gives me the error above. Do I need to disable some other switches in order to get profiling to work ? I briefly tried removing switches for pthreads, but that didn't help. Any guidance would be appreciated.

Thanks,

Geoff


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