oxidecomputer / oxidecomputer/hubris
`cargo xtask sizes --save` and `cargo xtask sizes ---compare` doesn't save/compare stack sizes
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.6k
- Forks
- 239
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 23
Description
Running the cargo xtask sizes command prints a bunch of different sizes, including flash and RAM sizes. In addition, it also prints (estimated) maximum stack depths for each task, so you can know how much of the RAM used by that task is for its stack, and how much stack margin the task has. This is useful and cool, and is not the problem.
The problem is that there are also --save and --compare flags to cargo xtask sizes, which save the observed sizes to a file and compare the current sizes against the sizes saved in that file, respectively. This is useful for assessing the difference in task sizes between two commits. Actually, when I said "the problem is. that there are also --save and --compare flags", that wasn't the problem, either --- the existence of these flags is also not the problem. The problem is that they don't look at the stack size or stack margin, meaning that you can't use them to compare stack usage estimates between two commits.
I wish that were not the case, because I would like to be able to do that sometimes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the cargo xtask sizes command and trace how its --save and --compare paths represent the reported measurements. Check how estimated stack depths and stack margins are printed, then make sure those values are included in saved data and comparison output. Run the relevant cargo xtask sizes commands to verify stack usage differences appear between saved and current results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100