profiling in linux
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.
-------
Andrew
PlaneShift - A MMORPG in development.
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
August 03, 2003 03:17 PM
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.
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement