I'm trying to profile a Windows application with Quantify, and the application creates processes that I would also like to profile. Does Quantify have any built-in ability to do that, or would I have to change the "CreateProcess" call to prepend "quantify" and some appropriate command-line option to the existing command line?
I am working with the trial edition of PurifyPlus 7.0.1, which doesn't seem to come with much in the way of documentation, and I don't see anything that looks like what I want when I do "quantify /?".
This topic has been locked.
4 replies Latest Post - 2011-09-16T21:14:29Z by JerryCallen
Pinned topic Does Quantify on Windows have the ability to profile spawned processes?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-09-16T21:14:29Z at 2011-09-16T21:14:29Z by JerryCallen
SystemAdmin 110000D4XK2948 PostsACCEPTED ANSWER
Re: Does Quantify on Windows have the ability to profile spawned processes?2011-09-15T16:36:31Z in response to JerryCallenHi Jerry,
> I'm trying to profile a Windows application with Quantify, and the application
> creates processes that I would also like to profile. Does Quantify have any
> built-in ability to do that, or would I have to change the "CreateProcess" call
> to prepend "quantify" and some appropriate command-line option to the existing
> command line?
The best way to deal with this situation is probably to "pre-instrument" the exe
that gets launched. In this manner, when FOO.exe is executed, it's actually the
Quantify'd version that is being run. How is this done?
1. Delete all files in your existing cache dir. (By default, this is probably
2. Open a CMD shell
3. Execute the following command to create an instrumented exe:
DOS> quantify /run=no /replace=yes FOO.exe
4. The original uninstrumented FOO.exe gets saved into FOO.exe.ORIGINAL while
the new FOO.exe is actually a Quantify'd app.
5. Add the following directories to your PATH environment variable:
Now, when your program launches FOO.exe, it's actually the Quantify'd version that
gets executed. (When you're done, just copy FOO.exe.ORIGINAL back to FOO.exe).
Re: Does Quantify on Windows have the ability to profile spawned processes?2011-09-16T18:51:40Z in response to JerryCallenI'm having some success with this, but it hasn't been very easy.
First off, I want to correct something I wrote earlier: there is documentation with the trial version of PurifyPlus. It just doesn't work with Chrome. I copied the URL (C:\Program Files (x86)\IBM\RationalPurifyPlus\PurifyPlus\help\Quantify\Webhelp\quantify.htm) from Chrome's address bar, pasted it into IE9, and - voila! - documentation. (Let me guess: the help system is built with RoboHelp, which doesn't play nice with Chrome...)
Next: I was able to instrument the subprocess executable pretty much as suggested, using a command line like this:
- myprog.exe.Original (a copy of myprog.exe)
- myprog.exe.QSel (the instrumented executable)
The original executable (myprog.exe) was left in place and not replaced by the instrumented executable. I manually deleted the original, renamed the "QSel" to the original name, and then ther instrumented executable ran autimatically when invoked as a spawned process from the main program.
I was also able to get this to work on specific DLLs (my system load DLLs into a generic framework, sot eh executable itself isn't very interesting to profile). I used the same command line and renaming trick; the only difference was to replace myprog.exe on the command line with mything.dll.
SO - thank you for the help!