Profiling Problems
Ok I want to profile a program I made on linux. I know I use gprof for this purpose so I read the docs and found out you have to compile witb the -pg option when using gcc. So I did however this doesn''t work it complains about a missing file called gmon.out which I suppose contains the profiling info.
This is what I do to compile my code
gcc Particle.c gl2d.c rand.c -ogl2d -lSDL -lSDLmain -lGL -lGLU -lpthread -pg
then I invoke gprof like this
gprof gl2d
and I get this message
gmon.out: No such file or directory
So can anybody tell me what I''m doing wrong? Oh I''m using RH7.3 btw
September 03, 2002 04:33 PM
Run you program once, then only invoke gmon. Eg:
gcc Particle.c gl2d.c rand.c -ogl2d -lSDL -lSDLmain -lGL -lGLU -lpthread -pg
./gl2d
gprof ./gl2d
Hope this helps.
gcc Particle.c gl2d.c rand.c -ogl2d -lSDL -lSDLmain -lGL -lGLU -lpthread -pg
./gl2d
gprof ./gl2d
Hope this helps.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement