メインコンテンツ

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

コード実行時間プロファイリング

コード セクションの実行時間プロファイルの表示と解析

実行時間プロファイリングを使用して、次を行うことができます。

  • 生成されたコードがターゲット ハードウェアのリアルタイム要件を満たしているかどうかを決定する。

  • パフォーマンスの改善が必要なコード セクションを決定する。

ソフトウェアインザループ (SIL) シミュレーション、プロセッサインザループ (PIL) シミュレーション、または XCP ベースのエクスターナル モード シミュレーションを構成して、生成コードの実行時メトリクスを生成できます。コード プロファイル アナライザー、コード実行レポート、またはシミュレーション データ インスペクターを使用して実行時間のメトリクスを解析します。

アプリ

コード プロファイル アナライザー生成コードの実行時間とスタック使用量のプロファイルを解析 (R2023a 以降)

クラス

すべて展開する

target.ProfilingFreezingOverhead停止および再開のインストルメンテーション オーバーヘッドの取得 (R2021a 以降)
target.ProfilingFunctionOverhead関数のインストルメンテーション オーバーヘッドの取得 (R2021a 以降)
target.ProfilingTaskOverheadタスクのインストルメンテーション オーバーヘッドの取得 (R2021a 以降)
target.Timerプロセッサのタイマーの詳細を提供する

オブジェクト

すべて展開する

coder.profile.ExecutionTimeSetAggregate code profiling results from multiple SIL, PIL, or external mode simulations (R2023b 以降)
coder.profile.test.TestHookDefine custom callback functions for coder.profile.test.runTests (R2025a 以降)

関数

すべて展開する

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 execution-time or stack usage analysis of code generated from Simulink models or MATLAB functions (R2024a 以降)
addAggregate execution-time profiles (R2023b 以降)
addDetailsAdd text items to Code Profile Analyzer display or code profiling report (R2025a 以降)
getExtract specific execution-time profile from aggregate of profiles (R2023b 以降)
removeRemove execution-time profile from aggregate of profiles (R2023b 以降)

トピック

ワークフローの概要

プロファイリングの構成と結果