Skip to content

Microoptimizations#82

Merged
chrysn merged 4 commits intomainfrom
small-optimizations
Mar 20, 2024
Merged

Microoptimizations#82
chrysn merged 4 commits intomainfrom
small-optimizations

Conversation

@chrysn
Copy link
Copy Markdown
Member

@chrysn chrysn commented Mar 8, 2024

One or more small tunings toward enhanced binary size

  • Thread::get_name(): On a DEVELHELP=0 minimal example, this saves 700 byte binary. (rust_begin_unwind would otherwise construct a Rust str out of a cstr, when normally it can know all arguments to write_str).
  • panic: Check for panic_handler_crash earlier. Saves another 100 bytes.

@chrysn chrysn marked this pull request as ready for review March 20, 2024 05:22
@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented Mar 20, 2024

CI fails due to formatting; #83 will fix this.

chrysn added 2 commits March 20, 2024 15:37
With the feature panic_handler_crash, a panic would previously have
tried to print details (depending on other features) before calling the
RIOT panic. This feature's purpose is to shut down everything ASAP, so
instead it now also bypasses these prints, allowing the compiler to also
remove the check for whether an interrupt is active.
@chrysn chrysn force-pushed the small-optimizations branch from e1359d4 to f228192 Compare March 20, 2024 05:38
@chrysn
Copy link
Copy Markdown
Member Author

chrysn commented Mar 20, 2024

Rebased onto #83 now; commit list thus shows unrelated commits.

@chrysn chrysn enabled auto-merge March 20, 2024 05:39
@chrysn chrysn merged commit f17d22a into main Mar 20, 2024
@chrysn chrysn deleted the small-optimizations branch March 20, 2024 05:59
chrysn added a commit to chrysn-pull-requests/RIOT that referenced this pull request Mar 20, 2024
Changes pulled by this are:
* optimizations around panicking <RIOT-OS/rust-riot-wrappers#82>
* administrative changes (CI fixes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant