Main Content

Code Profiling in Polyspace Platform User Interface

R2026b
Calculate C/C++ source code coverage with respect to existing tests, calculate execution times

You can calculate C/C++ code coverage, execution time, or memory use in the Polyspace Platform user interface. When you execute tests with coverage, execution profiling or memory profiling enabled, along with test results, you can see how much of your code was covered by the tests, or find bottlenecks in execution time or stack usage.

Polyspace Options

expand all

Folders to profile (-limit-instrumentation-to)Specify folders containing sources to be instrumented for code profiling (Since R2023b)
Folders to ignore (-ignore-dir)Specify folders to ignore during instrumentation (Since R2023b)
Files to ignore (-ignore-file)Specify files to exclude from source code instrumentation (Since R2023b)
Additional optionsSpecify additional instrumentation options (Since R2023b)
Type of profilingProfile one of code coverage, execution time, or memory use (Since R2023b)
Coverage level (-cov-metric-level)Specify level of code coverage metric calculation (Since R2023b)
Enable compact mode for coverage calculation (-compact)Reduce the amount of memory required to run test executable (Since R2023b)
Enable relational boundary coverage (-cov-relbound)Specify whether to calculate relational boundary coverage (Since R2023b)
Absolute tolerance (-cov-relbound-abs-tol)Specify absolute tolerance for relational boundary coverage (Since R2023b)
Relative tolerance (-cov-relbound-rel-tol)Specify relative tolerance for relational boundary coverage (Since R2023b)
Functions to ignore (-ignore-fcn)Specify functions to exclude from source code instrumentation (Since R2023b)
Function Call to ignore (-ignore-fcn-call)Specify function calls to exclude from source code instrumentation (Since R2023b)
Select by category (-sanitizer-selection errorType)Select sanitizer checks by error category (Since R2026b)
Numeric errors (-sanitizer-selection numeric)Enable detection of numeric errors at runtime (Since R2026b)
Memory errors (-sanitizer-selection memory)Enable detection of memory errors at runtime (Since R2026b)
Memory leaks (-sanitizer-selection memleak)Enable detection of memory leaks at runtime (Since R2026b)
Select from results file (-sanitizer-selection filePath)Select sanitizer checks guided by a Code Prover results file (Since R2026b)
Code Prover results file (-sanitizer-selection filePath)Specify path to a Code Prover results file for guided sanitization (Since R2026b)
Maximum error occurrences (-sanitizer-max-error-occurrences)Specify the maximum number of sanitizer error occurrences to report (Since R2026b)

MATLAB Functions

pstest.exportToPolyspaceProfilingResults(MATLAB Function) Export coverage results from Simulink Coverage, Simulink Test, or MATLAB Test to Polyspace Test

Topics

All Profiling

Code Coverage

Execution Time and Memory Use

Code Sanitization

Related Information