How do I profile Visual C++ components, such as ActiveX controls?

To profile a component, such as an ActiveX control, you can use selective instrumentation to instrument and collect performance data only for the component.

For example, to profile a Visual C++ ActiveX control run in Microsoft Internet Explorer 4.0 and later:

1.    In the Run Program dialog box, select Internet Explorer (usually located in C:\Program Files\Plus!\Microsoft Internet\Iexplore.exe or C:\Program Files\Internet Explorer\Iexplore.exe) and then click Settings.

2.    Select Selected Modules and click Configure to select the component and specify settings. For more information about using selective instrumentation, click images\shortcut.gif.

3.    Click Run to run Internet Explorer. When Internet Explorer loads the control, Quantify instruments the control and collects data for it while it runs.

You can also use inclusive instrumentation to instrument and run the container program that loads the component. When the container program loads the component, Quantify instruments the component and collects performance data.

For example, to profile a Visual C++ ActiveX control run in Microsoft Internet Explorer using inclusive instrumentation:

1.    In the Run Program dialog box, select Internet Explorer (usually located in C:\Program Files\Plus!\Microsoft Internet\Iexplore.exe or C:\Program Files\Internet Explorer\Iexplore.exe) and then click Settings.

2.    Ensure that Line or Function is selected as the default measurement type. Select All Modules and click Configure to select Time as the measurement type for Iexplore.exe.

3.    Instrument and run Internet Explorer. When Internet Explorer loads the control, Quantify instruments the control and collects data for it. To isolate the performance data for the control, use the Run Control toolbar to start and stop recording and clear data.

Notes:

§      When you selectively instrument a component in the transient state, Quantify collects performance data the first time you load and execute the component. If your program unloads the component and then reloads it during the same program run, data is not collected for the subsequent execution. To collect data for a component each time you reload it during a program run, instrument the component in the permanent state.

§      To use inclusive instrumentation to profile Visual C++ controls launched from Internet Explorer with the Active Desktop installed, you must pass the -new argument to Internet Explorer. For example, to profile a control from the command line, type quantify <path to IE>\iexplore.exe -new. The -new argument causes a new Iexplore.exe process to be instrumented before profiling your control. Without this argument, the control is run by the current desktop explorer and no performance data is collected. To check whether the Active Desktop is installed, right-click your desktop and choose Properties from the shortcut menu. If the Active Desktop component is installed, the Properties dialog box has a Web tab.

(C) Copyright IBM Corporation 1993, 2009.