Archived

This topic is now archived and is closed to further replies.

nickmerritt

Profilling?

Recommended Posts

nickmerritt    122
How does one, actually go about profilling a program. Do some compliers have one built in, or do you just code a profiller which just checks the clock and compares it? Does VC++.NET 2003 have a profiller? Thanks, in advance. Nick M

Share this post


Link to post
Share on other sites
markr    1692
Yes, it is built into the compiler.

It''s a compile-time switch which you turn on somehow. I don''t use MSVC, but I imagine there is an option on the GUI for it (there will be a command line option to CL too)

It adds code into the program which causes it to record timing info about its execution.

In gcc, it makes a binary file at runtime, which you can then examine using gprof, which makes a long txt report of functions and timings, and stuff like that.

I am fairly new to this myself, but I seem to have managed to figure it out.

Mark

Share this post


Link to post
Share on other sites
Sneftel    1788
MSVC++.net does not have a profiler built in. However, there''s a free profiler you can download for it; google for DevPartner Community Edition.


"Sneftel is correct, if rather vulgar." --Flarelocke

Share this post


Link to post
Share on other sites
Spudder    385
I''ve recently installed the DevPartner profiler for VS.NET and I highly recommend it. Build times do take a little longer if your using unmanaged C++ (no .NET) but the details it provides is incredibly useful - you can view call graphs for each function, find the top 20 methods called in your project and the top 20 methods overall.

It also lets you browse your code and will highlight those functions which used up a lot of time (though this may be due to the number of times they was called). All in all an excellent product and highly recommended.

Share this post


Link to post
Share on other sites
sjelkjd    171
The free devpartner profiler is alright, but it''s a very high-overhead profiler. That makes it less helpful when trying to profile interactive apps(such as games), because it''s very likely that the performance characteristics of your game change when running at very low fps. It also makes the profile cycle very long.
If you can afford it, i''d recommend intel''s VTune. If you can''t, dev partner profiler defintely will work, but it''s not the best tool out there.

Share this post


Link to post
Share on other sites