Main Content

Folders to profile (-limit-instrumentation-to)

Specify folders containing sources to be instrumented for code profiling

Since R2023b

Description

Limit code profiling to the source files in the specified folder. Polyspace® Test™ instruments the source files in only the specified folder for code profiling.

Set Option

Set the option using one of these methods:

  • Polyspace Platform user interface (desktop products only): In your project configuration, on the Testing & Profiling tab, select the All Profiling node and then enter folder paths for this option.

  • Command line: Use the option -limit-intrumentation-to. See Command-Line Information.

Why Use This Option

When you use this option, Polyspace Test instruments the source files of only the specified folder, even if your project contains other source files. By using this options, you limit the scope of profiling calculations.

Settings

No Default

Enter folders or navigate to a folder to instrument.

  • Add a single folder by clicking the Add empty row button and entering the path to the folder.

  • Navigate to a folder to instrument by clicking the Add folder button .

  • Add or update multiple folder paths by clicking the Add/edit multiple rows button and entering one path per line in the Add/edit multiple rows dialog box. Leading and trailing spaces are trimmed, and empty lines are ignored.

Dependencies

Specifying the same folder as an input to this option and the option Folders to ignore (-ignore-dir) results in an error.

Command-Line Information

The command-line workflow for setting this option depends on your workflow.

  • If you build your source and tests using a Polyspace Platform Project — Once you set this option in the project using the Polyspace Platform user interface, you cannot override or modify this option using the polyspace-test command.

  • If you build your sources and xUnit tests using your own toolchain — Specify this option to the polyspace-code-profiler command.

Parameter: -limit-instrumentation-to
Default: N/A
Example: polyspace-code-profiler -instrument -instrum-dir instrumFolder -limit-intrumentation-to folderToInstrument -- compileCommand

Version History

Introduced in R2023b