Main Content

matlabshared.targetsdk.Profiler Class

Namespace: matlabshared.targetsdk
Superclasses:

Code execution profiler that collects timing information for generated code

Description

A Profiler object that specifies the code execution profiler that collects time information for generated code.

Construction

H = Profiler(profilerName) creates a Profiler object and sets the Name property to profilerName.

Input Arguments

expand all

Name of profiler configuration, specified as a string.

Data Types: char

Properties

expand all

Name of Profiler object that a target supports. The default is ''.

Data Types: char

Name of the file that contains the source code of the profiler function. The default is ''.

The file specification must include a full path. The path can include tokens. If a path separator is included as part of the path, it must be valid for all supported host platforms.

Data Types: char

Name of the file that contains the declarations for the profiling function. The default is ''.

The file must include a full path. The path can include tokens. If a path separator is included as part of the path, it must be valid for all supported host platforms.

Data Types: char

Name of the source code function that returns the profiling timer counter value. You must implement this function in a source file and specify the source file with property SourceFile.

Data Types: char

Name of the data type of the return value of the profiling function TimerReadFcn. The default is 'uint32'.

Data Types: char

The resolution of the profiling timer in ticks per second. The default is 1e9.

Data Types: double

The flag that denotes whether the profiling function counts up. The default is true.

Data Types: logical

The flag that denotes whether the profiling function stores the ID of the core on which it executes. The default is true.

Data Types: logical

The flag that denotes whether the profiling function prints the profiling data. The default is true.

The data can be printed only if generated code runs on hardware with a file system, for example Linux®. If the generated code runs on hardware without a file system, data is collected in a source code buffer. The default is true.

Data Types: logical

A flag that denotes whether the profiling function prints the profiling data instantly. When set to true, the profile data prints to the standard output as soon as it is collected. Otherwise, the profile data prints when the generated code terminates. The default is true.

If the profiling data prints instantly, the amount of data that can be collected is not limited by the profiling buffer size. However, since the data prints as it is collected, executing the print instruction may take some time. This can greatly affect the profiling timing data.

Data Types: logical

The name of the buffer in the generated code that holds the profiling data. The default is 'profilingData'.

Data Types: char

The size of the buffer in generated code that holds the profiling data. The default is 400.

Once the buffer is full, collection of profiling data stops.

Data Types: double

The name of the MATLAB function that retrieves the profiling data from a file or a buffer on hardware and copies the data to the MATLAB host computer. The default is ''.

The source of the retrieval depends on the setting of the PrintData property. If set to true, the function retrieves the profiler data from a file. If false, the function retrieves the profiler data from the profiling buffer in the generated code running on the hardware.

Data Types: char

Version History

Introduced in R2015a