Skip to main content
GameDev.net gamedev.net
🔒 Locked

Which code profiler?

Started by johnnyk Dec 20, 2005 at 5:20 AM 14 replies 1.9k views
Original Post
johnnyk
johnnyk
What code profilers would you fellas recommend for performance profiling? Something that could tell me which lines used the most percentage of performance would be great. And if its free and build for Windows thats all the better! I want to find the problem areas of my physics engine. Thanks, John
markr
markr
You need to use a profiler which is compatible with your compiler.

That's to say, don't build it with a different compiler just to do profiling - that's completely pointless as your profile data will be different.

Therefore, when asking this question, it's necessary to state which compiler you're using.

Mark
johnnyk
johnnyk
MSVC++ 6
Joni-Matti
Joni-Matti
AMD CodeAnalyst. It free and it for Windows. Works for me fine (using MSVC 6).
Enigma
Enigma
Please people. Do yourselves a favour and upgrade to VC++ 8 Express. It's free. Surely you don't want to be using a seven year old compiler that predates the standardisation of the C++ language!

Enigma
paic
paic
Is there a code profiler included in VC2005 express ??
I use it since 2 days, and I must say that it's quite enjoyable. And it would be even more if there was a profiler included ^^

Edit : on VS2003 I use DevPartner profiler.
Joni-Matti
Joni-Matti
I do have VC++ 2005 Express also. I just haven't tested CodeAnalyst with it.
ajas95
ajas95
CodeAnalyst is the best. And free.

It has several modes, one will analyze a sequence of time and say "x function took y% of time" etc. This is useful in a high level way.

In Pipeline Simulation mode, it will take an executable and run it through a processor simulator and print out a graph that displays each stage of the pipeline as thousands of instructions execute. This is very useful for optimizing a specific piece of code, particularly if you write a lot of assembly.
demonkoryu
demonkoryu
Some AMD-specific paths like Pipeline Simulation don't work without AMD processor, but sampled and instrumented profiling is possible on Intel, too.
johnnyk
johnnyk
Quote:
Original post by ajas95
CodeAnalyst is the best. And free.

It has several modes, one will analyze a sequence of time and say "x function took y% of time" etc. This is useful in a high level way.

In Pipeline Simulation mode, it will take an executable and run it through a processor simulator and print out a graph that displays each stage of the pipeline as thousands of instructions execute. This is very useful for optimizing a specific piece of code, particularly if you write a lot of assembly.


Gotta say I downloaded it and I wasnt too impressed with CodeAnalyst, it wouldn't show me which functions were taking the most time besides the leaf ones which are used all over, so I couldnt really figure out which parts of mhy program were slow. Sure my transform function takes a lot of cycles, but whereabouts is it taking these cycles??? Unless I'm missing something with the app..
Samurai Jack
Samurai Jack
I would recommend intel VTune. It does not matter where you compile as long as you have the pdb files. It is great. It draws a graph of ticks where you can zoom in and out and see the problem code. It does not just show your tick counts how much a line of code took it also shows it on a larger scale. It is very very easy to use.
Nit
Nit
Then again, you could code up a profiler, and integrate it into your project. I use the profiler out of Game Programming Gems 1 (also used in the Enginuity series: http://www.gamedev.net/reference/articles/article1959.asp

Hope this helps someone.

EDIT:
Also first post as a GDNet+ Member :)
jdhardy
jdhardy
For those using MingW (or gcc on *nix) gprof works well enough. The output is a bit convoluted, but the manual does a decent job of explaining it.

I'm not a huge fan of CodeAnalyst, but it has the useful feature of being free, unlike vTune.
ProphecyEye
ProphecyEye
I highly recommend Glowcode. I have used in a production setting and it has been invaluable.
Shinkage
Shinkage
I find DevPartner Studio to be a fantastic tool. Definitely on the costly side (over 2 grand for the most complete version), bit it's got everything you need and the kitchen sink. Not only that, but it works, and it works well.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.