analyze execution-凯发k8网页登录
analyze execution-time and stack usage profiles for generated code
since r2023a
description
use the code profile analyzer to analyze execution-time and stack usage profiles produced by software-in-the-loop (sil) or processor-in-the-loop (pil) execution of generated code.
you can:
view execution times of tasks and functions, visualize the function-call stack at a specific simulation time, and compare execution times from different runs.
view stack usage for tasks and functions and compare values from different runs.
you can also use the code profile analyzer to analyze execution-time profiles produced by xcp-based external mode simulations.
open the code profile analyzer app
if you are generating code for a simulink® model, click the sil/pil tab. in the results gallery, under execution profiling results or stack profiling results, click the code profile analyzer button.
if you are generating code for matlab® code, terminate the sil/pil execution in the command window or in the test output tab in the matlab coder™ app. the code generator produces a message in the command window that contains a link to the execution or stack profiling report. click that link.
alternatively, for both simulink and matlab code generation, open the code profile analyzer from the command window after
the sil/pil execution has been terminated by entering coder.profile.show
or
coder.profile.show(
. profilevariable
)
for simulink code generation,
is a workspace variable that you specify through the workspace variable
(profilevariable
codeexecutionprofilevariable
) or stack workspace
variable (codestackprofilevariable
) configuration
parameter.
for matlab code generation, obtain
by using the or profilevariable
getcoderstackprofile
function.
examples
related examples
version history
introduced in r2023a