Selecting Specific Modules for Instrumentation (Coverage Monitoring)

Related Topics

You can use selective instrumentation to instrument and collect code coverage data only for those native-compiled (managed) code modules that you select. Selected modules must have debug data, and .exes must also have relocation data.

PureCoverage does not use the cache directory for selective instrumentation; instead, modules you select are instrumented, saved, and run in the same locations as the original, uninstrumented versions. The original modules are saved with the filename <moduleName>.original.

To use selective instrumentation in the PureCoverage user interface:

1.           Open the Executable Settings dialog box, or click Settings in the Run Program dialog box.

2.           Select the PowerCov tab.

3.           Select whether to use Line or Function as the default coverage level each time you run your program.

4.           Select Selected Modules, and then click Configure... to select the modules you want to instrument.

5.           In the Module Instrumentation [Selective] dialog box, click images\modnew.gif to add modules to the list of modules to instrument.

6.           Select the coverage level for each module, if you don't want to use the default.

7.           Select the instrumentation state for each module: Transient (the default), Permanent, or None (restores a previously instrumented module to the uninstrumented state).

You can also use the /SelectiveInstrumentation command line option in scripts and from the command line to selectively instrument modules.

Note:

§                  When you instrument a module such as a .dll or an ActiveX control in the transient state, PureCoverage collects analysis data the first time you load and execute the module. If your program unloads the module and then reloads it during the same program run, data is not collected for the subsequent execution. To collect data for a module each time you reload it during a program run, instrument the module in the permanent state.

(C) Copyright IBM Corporation 1993, 2010.