0

I have a C++ program that I want to profile as it needs too much running time.

Im am using windows for this program and I'd like to use a free profiler. I searched the net and found the AMD CodeAnalyst and very sleepy. The AMD tool does not work very good as I have an intel CPU. So nearly no information is coming out.

When using very sleepy, I have the problem, that I do not see the names of the functions in the summary. That means: The profiling itself works, but I cannot see what function took how long. I see just something like [123456789]as function name and 0 as line number. I think this is a problem of the debugging symbols.

Can you tell me, what I have to do to get it working (Visual Studio 2010)?

Thanks

Christian Wolf
  • 1,187
  • 1
  • 12
  • 33

3 Answers3

2

Visual Studio Profiler here : http://www.microsoft.com/download/en/details.aspx?id=23205

Instructions : http://msdn.microsoft.com/en-us/library/ms182372.aspx

Software_Designer
  • 8,490
  • 3
  • 24
  • 28
0

I've tried a number of them, including LTProf and ANTS, but I keep going back to this method. It's not a tool; it's just a technique. Here's a step-by-step example of using it. A lot of other people also use it, if you want links.

Community
  • 1
  • 1
Mike Dunlavey
  • 40,059
  • 14
  • 91
  • 135
0

There are two kinds of profiler.

The non-intrusive kind, which do not require modification to your code. IMHO these do not provide satisfactory results, although they are easier to use.

The intrusive kind, which require additions to your code. These provide better results, I think. I developed my own profiler of this kind, which has received good reviews. You can check it out at http://ravenspoint.wordpress.com/2010/06/16/timing/

ravenspoint
  • 19,093
  • 6
  • 57
  • 103
  • The code is not downloadable; there seems to be some server error. – Christian Wolf Dec 21 '11 at 14:55
  • The repository needed to be rebuilt after an engine ( fossil ) upgrade. It must have been down for several weeks, but no-one mentioned it despite getting 5 to 10 hits per day. So, thanks for letting me know. – ravenspoint Dec 21 '11 at 15:13
  • My hat is off to anyone with the nerve to build and publish a product. OTOH, by non-intrusive I assume you mean sampling. I've been looking for any profiler that could find speed bugs better than the *[the manual method (700x speedup)](https://sourceforge.net/projects/randompausedemo/)*, without success. There's an old saw that you're not after numbers, but insight. It really applies in performance tuning. – Mike Dunlavey Dec 21 '11 at 16:42
  • Insight without numbers is mere guesswork. The numbers will tell you where the bottlenecks are, which frequently surprises, then insight is needed to design effective fixes. – ravenspoint Dec 21 '11 at 17:18
  • @ravenspoint: Oh, you know, I'd love to engage you on that point, but I'm sure you have better things to do. Regardless, there are some slides in a .pdf on that sourceforge project that demonstrate it. – Mike Dunlavey Dec 21 '11 at 17:48