开发者

looking for a good vc++ profiler, already checked previous posts [closed]

开发者 https://www.devze.com 2023-01-02 22:45 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question

I'm looking for a good profiler for vs2008 professional edition, free or reasonably priced. I've already checked previous posts and tried about 8 profilers, but most of them are too basic or too detailed. Kindly suggest something, my requirements are as follows:

  1. It can be compiled, so that its well integrated with my application. I'm not shying away from instrumenting my methods.
  2. The output should be simple, i only need call count and time taken by methods and nothing else.
  3. I am mostly concerned about things INSIDE a method, you may call it line by line profiling. I wa开发者_C百科nt to select a method and know which line (expression / method call) is eating most of the time.


Maybe you consider it too basic, but if you want to know which lines of code would save you the most time by being optimized, the manual stack sampling method is very effective.

I would also suggest that point 2 (call count and time taken by routines) isn't exactly what you need, as in points 6 and 2 of this post. Rather, a line's percent-of-time-on-stack-during-the-interval-of-interest is the number that leads you straight to the "bottlenecks", and it does not need to be measured with high statistical precision.


You could try to download an open source profiler (VerySleepy, LukeStackWalker) and see how they sample an application, and try to extract that logic.

Your application could then start a second thread, which does nothing more than sampling the main thread (or all the other threads).

Notice that in order to give readable results, your application should have access to the debug information (pdb file), either the file directly or via a symbol server. An alternative could be to just dump the addresses with their counters to file, and do the translation of an address to a function name in an external utility.

0

精彩评论

暂无评论...
验证码 换一张
取 消