Rob
Rob

Reputation: 26334

Do I just completely misunderstand how to use Visual Studio's 2008 profiler?

complaining {

I always end up incredibly frustrated when I go to profile my code using Visual Studio 2008's profiler (from the Analyze menu option). It is one of the poorest designed features of VS, in my opinion, and I cringe every time I need use it.

}

I have a few questions concerning it's use, I'm hoping you guys can give me some pointers :-)

  1. Do you need to have your projects built in Debug or Release to profile them? One dialog (that I have no idea how to get back to) mentioned I should profile under Release. Okay - I do that - when I go to run the code, it tells me I'm missing PDB files. Awesome. So I go back to Debug mode, and I try to run it, and it tells me that half of my projects need to be recompiled with the /PROFILE switch on.
  2. Is it possible to profile C++/CLI projects? With the /PROFILE switch on, half of the time I get absolutely no output from my C++/CLI projects.
  3. Why, when attempting to profile C# projects, do they show up in the Report under Modules view Name list as 0x0000001, 0x0000002, 0x0000003, etc? Really, VS? Really? You can't take a guess at the names of my modules?
  4. For that matter, why are function names reported as 0x0A000011, 0x06000009, 0xA0000068, etc?
  5. Why, oh why, does VS rebuild EVERYTHING in the dependency tree of the executable being profiled? It might not be a problem if you have 5-6 projects in your solution, but when you have 70, it's almost quicker to not even bother with the profiler.
  6. Can you recommend any good guides on using the VS2008 profiler?

Upvotes: 4

Views: 1150

Answers (4)

Mike Dunlavey
Mike Dunlavey

Reputation: 40699

Just a general comment. There are a couple reasons people profile.

  1. To get a variety of timing info.
  2. To find out what they could fix to make their program faster.

These are very different goals.

If your reason is the second one, using a profiler is not the only way. See here

Upvotes: 1

Jonathan Allen
Jonathan Allen

Reputation: 70337

1.Do you need to have your projects built in Debug or Release to profile them?

Normally you use Release mode.

6.Can you recommend any good guides on using the VS2008 profiler?

Step 1, download ANTS Profiler.

Step 2, follow the easy to use on screen instructions.

Step 3, look at the easy to read reports.

Seriously, the Microsoft profiler is garbage compared to ANTS.

Upvotes: 1

Mike
Mike

Reputation: 4600

If you're finding it difficult to use, there's a really great .NET profiler called nprof, and if you're debugging non-CLR projects, AMD has a really spectacular statistical profiler called Code Analyst.

Both are free(!), and exceedingly easy to use. A much nicer alternative, and I expect from your post above you're about ready to ditch the VS builtin profiler anyway :)

Upvotes: 3

leppie
leppie

Reputation: 117330

I have the same feeling about that thing. I ended up writing my own (all I wanted was decent method call timing info).

Upvotes: 1

Related Questions