User`s guide
profile
Using Profiling
The following items affect your ability to profile project execution and
stack usage:
Execution profiling works on code you generate from a Simulink
model. You cannot profile manually written code that you provide in
your project.
Stack profiling works with both model-generated co de and your
custom code.
Stack profiling does not work when your project uses DSP/BIOS. You
getanerrorwhenyouprofile the system stack with D SP/B IOS enabled.
To use DSP/BIOS, you must install Ta rget Support Packa ge TC6
software.
For m ore information about enablingandusingexecutionprofiling,
refer to “Real-Time Execution Profiling ” on pag e 4-11.
Examples This example presents two forms of the data returned by profile—tic
and raw. The generated code did not includeDSP/BIOS.
Running
profile returns structure ps containing profiling data
gathered while your p rogram ran. Stop the running program before
you request the profile data.
ps=profile(cc,'execution','tic')
ps =
cpuload: 0
obj: [3x1 struct]
ps.obj(1)
ans =
name: 'KNL_swi'
7-109