[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 295
  • Last Modified:

What is the most appropriate tool for profiling C++ application in Windows?

Hi,

My goal is to profile my C++ application (Visual Studio 2005) - I want the following cababilities:

1) Memory debugging (pinpoints hard to find memory errors such as uninitialized memory access, buffer overflow and improper freeing of memory)

2) Memory leak detection (identifies memory blocks that no longer have a valid pointer)

3) Performance profiling: (highlights application performance bottlenecks and improves application understanding with a graphical representation of function calls)

4) Code coverage (identifies untested code with line-level precision).

I know that PurifyPlus for example is doing it - but the problem is that my application is not a single process but it has some nanny architecture which I'm going to describe:

My C++ application (I have a debug build) is built from several processes (.exe files). When the application is up, a service is installed and it lifts up 3 processes (there is an option to invoke first a process instead of the service). One of the tree (let's call it process A) is the nanny of another process (let's call it process B) which by itself is the nanny of another process (let's call it process C) which by itself is the nanny of another process (let's call it process D).

Suppose I want to analyze process C (or any process in this architecture) - What is the most appropriate tool for my needs? Can PurifyPlus help me?


Thanks a lot!
0
HPBSM
Asked:
HPBSM
  • 4
  • 3
  • 3
3 Solutions
 
JIEXACommented:
For the (3) I've found a nice tool: Very Sleepy (http://www.codersnotes.com/sleepy). It works on a release binary, without change.

If the application is portable for Linux, for the (1) and (2), I recommend using valgrind, and for (4) there are standard options for gcc/g++ for code coverage.

I'm not aquanted with PurifyPlus...

0
 
HPBSMAuthor Commented:

Thanks,

1. Do you know this application? Did you try it before? I want to get some recommendation since I've seen in the net that there are problems to understand this app.
2. Is it freeware or should I buy a license?
3. Currently my application is not portable for Linux so do you have another offer? is "very sleepy" works for (1) and (2) as well?
0
 
LeeeRussellCommented:
I've used PurifyPlus and, if I've understood your application description correctly, it will do all the things you've asked.  In order to do 4 I think you might need an add-on to the core PurifyPlus software, but I've seen it talked about in the literature.

However, the documentation for PurifyPlus is pretty awful and doesn't describe the version that IBM are currently selling.  The software is not difficult to use, but set aside a couple of weeks to learn how to use it and understand it fully.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
HPBSMAuthor Commented:
LeeeRussell,

I think that the problem in using PurifyPlus is that it enforces me to launch my process (by some command line) which should be profiled but:

1. I have several processes in the nanny architecture I've described above and not a single process.

2. A procees (except for the root process which is originally a service) can be lauched only by its nanny and not by some command line.

3. I'm not a PurifyPlus expert but this is what I've learnt of.
0
 
LeeeRussellCommented:
Yes, I think I understood that.  It doesn't matter if you have several processes.

Purify works by adding instrumented code at the link stage of the build.  If you build the sub-processes with Purify they will still be analysed by Purify when they are called by the Nanny process.
0
 
HPBSMAuthor Commented:
LeeeRussell Thanks,

1. According to all the information supplied, would you reccomend PurifyPlus or maybe other tool is better?

2. If PurifyPlus is the best for my needs - how can I deal with the documentation problem? If I download the latest trial version where should I take the documnetation from?

Thanks!
0
 
JIEXACommented:
I know Very Sleepy personally. We lived in the same block :-))
I used it at work, and at least 2 my colleagues used it also. It was free when I read it's license, GPL. Try to use it yourself and get your own opinion. It's simplistic, yes, and very small. It's statistical (you don't get function calls number, only percentage of CPU usage). You preferably should have some experience with CPU usage profiler, but it's not mandatory.

Very Sleepy is a CPU usage profiler, so it's not usable for (1) and (2).
0
 
JIEXACommented:
I have no recommendations for coverage and memory debugger on Windows.
0
 
LeeeRussellCommented:
The only commercial application I've used is Purify, and it was better than all the free/open-source solutions I'd tried.

The documentation is bad but just about good enough to know roughly where you should start.  The software is straightforward enough to muddle your way through to using it after that.
0
 
HPBSMAuthor Commented:
Thanks a lot, Guys I'll use your recommendations.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 4
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now