Exclude Files From the Graph
The power of FlowTracer is its ability to capture all inputs and outputs for each job. When determined as more efficient, such as ignoring details that are considered as unnecessary or of little importance, selected files can be excluded from the dependency graph.
Files are sometimes excluded from a dependency graph when a file exists on one machine but not another. For example, suppose you are running vovserver on a 32-bit machine (lnx32) but you are compiling a C-file on a 64-bit machine (lnx64). The compilation probably requires the file /lib64/libgcc_s.so.1 which exists on lnx64 but not on lnx32. If the compiler declares /lib64/libgcc_s.so.1 as input, the vovserver (running on lnx32) will not find such file and therefore declare the compilation as failed. Having such a file in the dependencies is not really useful and the exclusion mechanism described in this section is an easy way to avoid these dependencies.
- Based on a regular expression.
- Based on a prefix: these rules are a special case of regular expressions but they execute faster,
vtk_exclude_rule -prefix /usr/tmp
vtk_exclude_rule -regexp {\.tmp$}
if { $EXCLUDE_TOOL == "dc_shell" } {
vtk_exclude_rule -regexp {/command.log}
}
The exclude file is used by the tools and it is ignored by the server. Any change to the exclude file is effective immediately for all the tools that are executed after the change. The change, however, has no retroactive effect. Files to be excluded that are already in the graph must be forgotten explicitly with other commands.
Procedure | Arguments | Description |
---|---|---|
vtk_exclude_rule | [ -prefix |
|
Define an exclusion rule. This procedure is used in the
exclude.tcl file and can also be used in
the encapsulation files. Examples:
|
vtk_path_exclude |
path |
Test whether a path is excluded by the rules that have been defined. This procedure is normally not used in the exclude.tcl file. |
Examples of vtk_exclude_rule
For an example of exclude file, see the default file for the "generic" project type at $VOVDIR/local/ProjectTypes/generic/exclude.tcl.
# The files that start with these prefixes will not be added to the graph.
vtk_exclude_rule -prefix {${VOVDIR}}
vtk_exclude_rule -prefix /dev/
vtk_exclude_rule -prefix /devices/
vtk_exclude_rule -prefix /etc/
vtk_exclude_rule -prefix /proc/
vtk_exclude_rule -prefix /lib/
vtk_exclude_rule -prefix /opt/CC
vtk_exclude_rule -prefix /tmp/
vtk_exclude_rule -prefix /tmp_mnt/usr/
vtk_exclude_rule -prefix /usr/
vtk_exclude_rule -prefix /var/
vtk_exclude_rule -prefix c:/
vtk_exclude_rule -regexp {Dependency.state$}
vtk_exclude_rule -regexp {/gcc-lib/}
vtk_exclude_rule -prefix /lib64; ### Added for multi-arch compilations.
# -- Exclude the NT executables from the current installation.
vtk_exclude_rule -regexp {VOVDIR.*/[a-z]+\.exe$}
# -- Tool dependent exclusion rule.
# -- (the first arg is the wrapper, the second the tool)
# -- Could also use the variable EXCLUDE_TOOL
switch -- [lindex $argv 1] {
"toolx" {
vtk_exclude_rule -regexp /TOOLXCACHE/
}
}
Debugging the Exclusion Mechanism
Use the environment variable VOV_STRICT_TRACING to disable the exclusion mechanism in your shell.
-
% setenv VOV_DEBUG_FLAGS 128
- Run the tools.
Additional Files with Exclusion Rules
% setenv VOV_EXCLUDE_FILES $VOVDIR/local/exclude/exclude.cdn.tcl
% setenv VOV_EXCLUDE_FILES $VOVDIR/local/exclude/exclude.cdn.tcl:$VOVDIR/local/exclude/exclude.snps.tcl