runtime: Force run_reset_flow to not inline#3881
Merged
ternst-nv merged 1 commit intoJun 15, 2026
Merged
Conversation
The run_reset_flow was previously inlined as part of the runtime entry point. This method was only invoked once during initialization, but due to being inlined its stack requirements (~6Kb) persisted for the entire duration of the runtime execution. By forcing the function to no longer be inlined its stack usage is recovered after completion, saving ~6Kb of stack space, and ~400 bytes of instruction memory.
ternst-nv
requested review from
bluegate010,
clundin25,
fdamato,
jhand2,
mhatrevi,
rusty1968,
swenson,
timothytrippel,
vsonims and
zhalvorsen
as code owners
June 15, 2026 14:13
pjhades
approved these changes
Jun 15, 2026
clundin25
approved these changes
Jun 15, 2026
ternst-nv
enabled auto-merge (squash)
June 15, 2026 15:43
zhalvorsen
approved these changes
Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The run_reset_flow was previously inlined as part of the runtime entry point. This method was only invoked once during initialization, but due to being inlined its stack requirements (~6Kb) persisted for the entire duration of the runtime execution.
By forcing the function to no longer be inlined its stack usage is recovered after completion, saving ~6Kb of stack space, and ~400 bytes of instruction memory.
Firmware stats after change:
FW Size
ROM and FMC are unaffected (RT-only change). Runtime gains ~0.38 KiB of ICCM
headroom. Image-bundle free space: 21,320 B → 21,712 B.
Stack Usage (peak per command)
All commands improve by the same 6,032 B because the reduction is in the shared
entry-frame floor that sits beneath every command.