Jump to content
  • Advertisement
Sign in to follow this  
Thrust

Free C++ Profiler?

This topic is 5020 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!