To accurately measure the size of sprintf in a finished binary, the
easiest method is to simply build a binary with and without sprintf.
This patch adds an integration test that can be built with and without
sprintf, as well as targets to build it.
Details
Details
- Reviewers
sivachandra lntue - Commits
- rG0e27dfd56061: [libc] add sprintf size comparison
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Good to go after absorbing https://reviews.llvm.org/D131752
libc/test/integration/src/stdio/CMakeLists.txt | ||
---|---|---|
4 | Add a comment here saying that these are really not tests for testing sake but just a way to produce hermetic binaries to be used to compare binary sizes. |
Comment Actions
Remarks seems like a useful tool for future optimization, but here I'm trying to measure not just how many instructions and stack spaces the function takes up. I'm looking to evaluate the number of bytes adding sprintf will add to a file, including things like rodata and other overhead, and it doesn't look like remarks has a way to measure that easily.
Add a comment here saying that these are really not tests for testing sake but just a way to produce hermetic binaries to be used to compare binary sizes.