Code Stack Usage Profiling - MATLAB & Simulink (original) (raw)
Main Content
View and analyze stack usage profiles of code sections
Use stack usage profiling to:
- Determine stack memory requirements for your target hardware.
- Observe the effect of compiler optimization and data input on stack usage.
You can configure software-in-the-loop (SIL) or processor-in-the-loop (PIL) simulations to produce stack usage metrics for your generated code. Use the Code Profile Analyzer, code stack profiling report, or Simulation Data Inspector to analyze stack usage metrics.
Objects
Functions
add | Aggregate stack usage profiles (Since R2023b) |
---|---|
addDetails | Add text items to Code Profile Analyzer display or code profiling report (Since R2025a) |
get | Extract specific stack usage profile from aggregate of profiles (Since R2023b) |
remove | Remove stack usage profile from aggregate of profiles (Since R2023b) |
coder.profile.test.runTests | Automate execution-time or stack usage analysis of code generated from Simulink models or MATLAB functions (Since R2024a) |
Topics
- Create Stack Usage Profile for Generated Code
Configure SIL or PIL simulation to produce stack usage metrics for generated code. - View and Compare Stack Usage Metrics
Determine size of stack memory that is required to run generated code. - Aggregate Stack Usage Profiles to Identify Most Demanding Execution
Identify and analyze most demanding task execution and test using stack usage profiles. - Stack Usage Profiling From Command Line
Use line commands to configure stack usage profiling and view report.