Advertisement

Profiling Problems

Started by September 03, 2002 02:21 PM
1 comment, last by Monder 22 years, 4 months ago
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
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.
Advertisement
Thanks a lot it''s working fine

This topic is closed to new replies.

Advertisement