Skip to content

cargo xtask sizes --save and cargo xtask sizes ---compare doesn't save/compare stack sizes #2352

@hawkw

Description

@hawkw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildAffects or requires changes in the build systemdeveloper-experienceFixing this would have a positive impact on developer experience

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions