Excluding libraries, directories, and files

Use exclude directives to exclude from instrumentation libraries, directories, and individual files. This reduces the volume of coverage data and improves run-time performance.

PureCoverage reads exclude directives at build time from the .purecov and .purecov.<platform> files. PureCoverage looks for these files in:

The .purecov and <purecov.platform> files, as shipped by Rational Software, contain a set of default exclude directives. Add or remove directives, then re-link your application to apply the changes.

Exclude directive syntax

Each directive begins with exclude followed by the name of a library, directory, or file. For example:

exclude /usr/lib

This directive disables instrumentation for files whose pathname begins /usr/lib, such as /usr/lib/libc.a.

Use canonical names in exclude directives, not symbolic link names. (During instrumentation, PureCoverage expands all symbolic links and creates canonical versions of all pathnames. This prevents the coverage data from listing the same file under multiple names. Names in the exclude directives must therefore match the canonical names.)

This is especially an issue when your program obtains site-wide libraries from a remote file system via a generic pathname that is a symbolic link to a specific installation directory. To handle this problem:

Notes: