Comments (5)
Thanks for the kind words about Bloaty!
I need to implement this. You're right that the existing info is all for ELF.
Mach-O gets build IDs by default in the LC_UUID
load command. No special flag is required. It should be relatively simple to make this work by implementing MachOObjectFile::GetBuildId()
to read this id.
We could go further and try to automatically find the debug info file, running dsymutil
if we can't find it. But for now I'll just implement the simple thing.
from bloaty.
Thanks for #133. I'm a bit confused by this TODO though. Without DWARF support, it's still not possible to profile a stripped MachO binary via the .dSYM, right?
from bloaty.
You can use a symbol table from a non-stripped binary to profile a stripped binary. This is what is documented above that TODO, and it works for both ELF and Mach-O. It doesn't require .dSYM files.
$ cp bloaty bloaty.stripped
$ strip bloaty.stripped
$ ./bloaty -d compileunits --debug-file=bloaty bloaty.stripped
from bloaty.
Unfortunately dsymutil
doesn't appear to put a full symbol table in the .dSYM
file, so I don't think this technique will work via dsymutil
.
from bloaty.
I take it back, dsymutil
does appear to put a symbol table in .dSYM
. This works as expected:
$ strip bloaty
$ dsymutil bloaty
$ $ ./bloaty --debug-file bloaty.dSYM/Contents/Resources/DWARF/bloaty bloaty -d symbols
I should update the docs accordingly. Maybe this means I can also enable -d compileunits
for Mach-O!
from bloaty.
Related Issues (20)
- testing bloaty with chromium
- Can't read index 0 from strtab
- Add SORTBY option for vm and file size diffs
- bloaty broken on ubuntu 22.04 HOT 3
- Overflow in vm range HOT 1
- Total size in compare dont show correctly ! HOT 1
- Allow builders to prefer using system libraries
- Build broken on Arch Linux with ABSL_ASSUME errors from protobuf headers HOT 3
- Compiling under C++17 produces hundreds of warnings
- Plus sign confusing when size decreased
- zlib build failure when using bundled version HOT 1
- Size diff broken after PR #313 "Preserve Size Information During Diff"
- `couldn't find abbreviation for code` when run with `-d compileunits`
- Add support for DWARF form 30
- this tool support for windows? HOT 1
- --raw-map option missing from help string
- crash on reversed high_pc/low_pc with -d compileunits
- error building due to refinition in abseil-cpp/absl/numeric/int128.cc
- How to read the debuginfo from the Chromium output object file
- Bloaty accepts `-n 0` but not `max_rows_per_level: 0` when using `-c` option
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bloaty.