Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microoptimizations #82

Merged
merged 4 commits into from
Mar 20, 2024
Merged

Microoptimizations #82

merged 4 commits into from
Mar 20, 2024

Conversation

chrysn
Copy link
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
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
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
59 checks passed
@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