Josh Haberman (@JoshHaberman) profile picture

I work on the Protocol Buffers team at Google. I created upb (a small C protobuf implementation) and Bloaty (an ELF/Mach-O/PE/WASM binary size profiler).

Seattle, WA
Joined May 2011
Photo by Josh Haberman (@JoshHaberman)Photo by Josh Haberman (@JoshHaberman)Photo by Josh Haberman (@JoshHaberman)
Josh Haberman retweeted
This debugging technique should be common knowledge, but I run across it all the time. When an error message is confusing, by far the most practical method to figure it out is to: 1. copy the file to a new file, save the original 2. delete code until the message goes away 3. revert to the previous version that still produced the error 4. goto step 2, and delete something else 5. continue until you have the minimum piece of code that generates the error This usually clears up the understanding of the issue. The D "dustmite" program (created by crackerjack developer Vladimir Panteleev) can do this automatically. Recently, I was handed a program with a baffling error in it. I noticed it was loaded with templates, conditional compilation, irrelevant functions, and complex declarations. Deleting all that fluff out of it led directly to the problem. This is the most powerful debugging technique I know of. I use it all the time.
16
11
6
174
16,945
Bloaty McBloatface is nice github.com/google/bloaty
3
1
26
Update: I used Bloaty McBloatface to diff the binaries, and the difference is almost completely Bitcode related. Suddenly there's much less of it necessary. The actual binary is just 0.1MB smaller.
1
3
1
38
Josh Haberman retweeted
Bloaty McBloatface will show you a size profile of the binary so you can understand what's taking up space inside. The following file formats are supported: • ELF • Mach-O • WebAssembly (experimental) buff.ly/2yqI902
44
7
159
Super awesome tool! 🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🙏🙏🙏🙏🙏🙏🙏🙏 I got nice summary of 1.2 GB of libtorch.a with bloaty!!!
Josh Haberman retweeted
Used Bloaty McBloatface (github.com/google/bloaty) for the first time today. Wish I'd known of it earlier. Super easy to install, easy to use, and great docs. Good job @JoshHaberman and other contributors!
1
2
4
C++ template classes. Fast, but lots of code emitted. Bloaty McBloatface saves the day.
3
17
Our 15th Anniversary Season features Thomas Tallis's 40-part monster "Spem in alium" and a performance of Bach's "Wachet auf" and "Magnificat" with the Seattle Baroque Orchestra (Early Music Seattle) in the newly renovated Town Hall. byrdensemble.com/concerts
1
2