Sign in to follow this  

Free C++ Profiler?

This topic is 4716 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, Ive been working on my game for a while and noticed a few bumpy parts. I recently heard of a profiler and am interested in running one to optimize my game but I dont know where to find one. I googled and only found ones for Visual C++ but I used Dev-C++. Know where I can get one? Thanks,

Share this post


Link to post
Share on other sites
Dev-C++ uses MinGW which has a profiler called "gprof" that may not be the best profiler in the world, but it can get the job done. There ought to be an option to turn on the profiling for your code somewhere in the compilation options. You then run your program as you normally would. Let the program go for a good amount of time and make sure that you get a good sample of coverage (so make sure that you experience all of the "rough spots" at least once). The exit the program and run gprof (you will probably need to run it from the command line). I'm sure if you google it, you can find full tutorials showing how to use it.

Edit: By the way, gdb is a debugger and not a profiler.

Share this post


Link to post
Share on other sites
You are in luck!
MinGW or rather GCC, the compiler used by Dev-C comes with a profiler, gprof, you have to compile your application with the flag -pg added to both compilation and linking and then you run gprof on an output file your application will generate.

for more info RTMF.

Because of the GNU license on gprof you cannot redistribute binaries compiled and linked with the -pg flag unless you GPL your code as well, but since you will be only using the exe internally and not for public release, you're safe, just remember to remove the -pg flag when building your release versions.

Hope that helps [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by Thrust
Hey,
Ive been working on my game for a while and noticed a few bumpy parts. I recently heard of a profiler and am interested in running one to optimize my game but I dont know where to find one. I googled and only found ones for Visual C++ but I used Dev-C++. Know where I can get one?

Thanks,


If you want, take a look at mine I posted here on a previous thread. Here is the new link - I made a Dev-CPP version ready to run!

- Drew

Share this post


Link to post
Share on other sites

This topic is 4716 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this