Bloaty performs a deep analysis of the binary. Using custom
ELF, DWARF, and Mach-O parsers, Bloaty aims to accurately
attribute every byte of the binary to the symbol or
compileunit that produced it. It will even disassemble the
binary looking for references to anonymous data.
Bloaty bundles libprotobuf, re2, capstone, and
pkg-config as Git submodules, and uses protoc build
from libprotobuf, but it will prefer the system’s versions
of those dependencies if available. All other dependencies
are included as Git submodules.
If the Git repository hasn’t been cloned with the
--recursive, the submodules can be checked out with:
Bloaty: a size profiler for binaries
Ever wondered what’s making your binary big? Bloaty will show you a size profile of the binary so you can understand what’s taking up space inside.
Bloaty performs a deep analysis of the binary. Using custom ELF, DWARF, and Mach-O parsers, Bloaty aims to accurately attribute every byte of the binary to the symbol or compileunit that produced it. It will even disassemble the binary looking for references to anonymous data.
Bloaty supports many features:
For detailed info on all of Bloaty’s features, see the User Documentation.
For more information about the analysis performed by Bloaty, please see How Bloaty Works.
Install
To build, use
cmake. For example:Bloaty bundles
libprotobuf,re2,capstone, andpkg-configas Git submodules, and usesprotocbuild from libprotobuf, but it will prefer the system’s versions of those dependencies if available. All other dependencies are included as Git submodules.If the Git repository hasn’t been cloned with the
--recursive, the submodules can be checked out with:To run the tests, see the info in tests/README.md.
Support
GitHub issues and PRs welcome. Please include tests when possible, see: tests/README.md.
This is not an official Google product.