Profilling?

Started by
4 comments, last by nickmerritt 20 years ago
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
Nick
Advertisement
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
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
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.
Thanks, I think I will try that.


Nick
Müsli Games
www.musli.tk
Nick
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.

This topic is closed to new replies.

Advertisement