matlabshared.targetsdk.Profiler Class
Namespace: matlabshared.targetsdk
Code execution profiler that collects timing information for generated code
Description
Use the Profiler
class to specifies the code execution
profiler that collects time information for generated code.
Creation
creates a H
= matlabshared.targetsdk.Profiler(profilerName
)Profiler
object H
and sets the
Name property to
profilerName
.
Input Arguments
Name of profiler configuration, specified as a character vector or string scalar.
This argument sets the Name property as a character vector.
Data Types: char
| string
Properties
Name of Profiler
object that a target supports,
specified as a character vector or string scalar.
Data Types: char
| string
Name of the file that contains the source code of the profiler function, specified as a character vector or string scalar.
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
| string
Name of the file that contains the declarations for the profiling function, specified as a character vector or string scalar.
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
| string
Name of the source code function that returns the profiling timer counter value,
specified as a character vector or string scalar. You must implement this function in a
source file and specify the source file with property
SourceFile
.
Data Types: char
| string
Data type of the return value of the profiling function
TimerReadFcn
, specified as a character vector or string
scalar.
Data Types: char
| string
Resolution of the profiling timer in ticks per second, specified as an integer.
Data Types: double
Flag that denotes whether the profiling function counts up, specified as logical 1 (true) or 0 (false).
Data Types: logical
Flag that denotes whether the profiling function stores the ID of the core on which it executes, specified as logical 1 (true) or 0 (false).
Data Types: logical
Flag that denotes whether the profiling function prints the profiling data, specified as logical 1 (true) or 0 (false).
The data can be printed only if generated code runs on hardware with a file system, such as Linux®. If the generated code runs on hardware without a file system, data is collected in a source code buffer.
Data Types: logical
Flag that denotes whether the profiling function prints the profiling data
instantly, specified as logical 1 (true) or 0 (false). 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.
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.
Data Types: char
| string
The size of the buffer in generated code that holds the profiling data, specified as an integer.
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, specified as a character vector or string scalar.
The source of the retrieval depends on the setting of the
PrintData
property. If PrintData
is set to
true
, the function retrieves the profiler data from a file. If
PrintData
is set to false
, the function
retrieves the profiler data from the profiling buffer in the generated code running on
the hardware.
Data Types: char
| string
Version History
Introduced in R2015a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)