Advertisement

profiling in linux

Started by August 03, 2003 02:25 PM
5 comments, last by browny 21 years, 3 months ago
how do i profile a program using the gcc compiler. I read in the manual that "-p" or "-pg" does the job but i just can't get it to work :S. And one more thing. What is the linux couterpart of "wglGetProcAddress" ? [edited by - browny on August 3, 2003 3:30:33 PM]
Z
-pg is the normal flag for profiling. What do you mean by " can''t get it to work"?

-------
Andrew
PlaneShift - A MMORPG in development.
Advertisement
well.. i compiled the source with "-p" or "-pg" and then ran the program normally. After that i am supposed to run "prof" right ? But it says some "a.out" or something is missing ! What''s that ?
Z
Supply the filename of the executable you would like profiled as a parameter to the profiling program.
What you do is run a.out normally and it will generate a gmon.out file. You then run gprof:

gprof a.out

and it will generate the profile tree for you. I also use a GUI called kprof which makes it much easier to see what is going on.


quote: And one more thing. What is the linux couterpart of "wglGetProcAddress" ?

glXGetProcAddress
Advertisement
extern void (*glXGetProcAddressARB(const GLubyte *procName))(void);
our new version has many new and good features. sadly, the good ones are not new and the new ones are not good

This topic is closed to new replies.

Advertisement