Main Content

代码执行探查

查看和分析代码节的执行配置文件

利用代码执行探查可以:

  • 确定生成的代码是否满足目标硬件的实时要求。

  • 确定哪些代码节需要进行性能改进。

您可以配置软件在环 (SIL)、处理器在环 (PIL) 或基于 XCP 的外部模式仿真,为您生成的代码产生执行时间度量。可以使用代码执行报告或仿真数据检查器来分析执行时间。

App

代码探查分析器Analyze execution-time and stack usage profiles for generated code (自 R2023a 起)

全部展开

target.ProfilingFreezingOverheadCapture freezing and unfreezing instrumentation overhead (自 R2021a 起)
target.ProfilingFunctionOverheadCapture function instrumentation overhead (自 R2021a 起)
target.ProfilingTaskOverheadCapture task instrumentation overhead (自 R2021a 起)
target.TimerProvide timer details for processor (自 R2020b 起)

对象

全部展开

coder.profile.ExecutionTimeSetAggregate code profiling results from multiple SIL, PIL, or external mode simulations (自 R2023b 起)

函数

全部展开

annotate对探查的模型组件着色或打开模型并对探查的组件着色
display生成描述如何打开代码执行探查报告的消息
ExecutionTimeInTicksGet execution times in timer ticks for profiled section of code
ExecutionTimeInSecondsGet execution time in seconds for profiled section of code
Name获取探查的代码节的名称
Number获取唯一标识探查的代码节的编号
NumCallsTotal number of calls to profiled code section
scheduleVisualize task scheduling (自 R2021a 起)
SectionsGet array of coder.profile.ExecutionTimeSection objects for profiled code sections
SelfTimeInTicksGet number of timer ticks recorded for profiled code section, excluding time spent in child functions
Time获取代码节的仿真时间
TimerTicksPerSecondGet and set number of timer ticks per second
TotalExecutionTimeInTicksGet total number of timer ticks recorded for profiled code section
TotalSelfTimeInTicksGet total number of timer ticks recorded for profiled code section, excluding time spent in child functions
TotalTurnaroundTimeInTicksGet total number of timer ticks between start and finish of the profiled code section over the entire simulation
TurnaroundTimeInTicksGet number of timer ticks between start and finish of the profiled code section
reportOpen code execution profiling report and specify display of time measurements
MaximumExecutionTimeCallNumGet the call number at which maximum number of timer ticks occurred
MaximumExecutionTimeInTicksGet maximum number of timer ticks for single invocation of profiled code section
MaximumSelfTimeInTicksGet the maximum number of timer ticks recorded for profiled code section, excluding time spent in child functions
MaximumTurnaroundTimeCallNum Get call number of the maximum number of timer ticks between start and finish of a single invocation of profiled code section
MaximumTurnaroundTimeInTicksGet maximum number of timer ticks between start and finish of a single invocation of profiled code section
coder.profile.test.runTestsAutomate analysis of code profiling metrics (自 R2024a 起)
addAggregate execution-time profiles (自 R2023b 起)
getExtract specific execution-time profile from aggregate of profiles (自 R2023b 起)
removeRemove execution-time profile from aggregate of profiles (自 R2023b 起)

主题

工作流概述

探查配置和结果