For SPS/breakpad based profiling, it would be useful to get some simple information about what fraction of a module's text segment is covered by the read CFI, so that it is possible to easily diagnose missing-CFI situations. Something along the lines of "read CFI from libxul.so, 12.34MB text, 9.87MB covered by CFI (78%)". Currently thinking of doing this by adding some kind of GetStats method for class google_breakpad::Module, which we can call after the Module has been populated.
Generates output along the following lines (just the last line): LoadSymbols: BEGIN /home/sewardj/.../dist/bin/libxul.so LoadSymbols: read CFI from .eh_frame LoadSymbols: SUCCESS /home/sewardj/.../dist/bin/libxul.so show_CFI_stats: 53337853 mapped r-x, 29394029 covered by CFI (55%), 135421 CIEs One problem is that the r-x mapped area is dictated by the ELF program headers, but for coverage purposes what seems more relevant is the size of the .text section, which is a lot smaller than the mapped size. That information is not easily available though. This is the reason why the apparent coverage in this example is only 55%. In truth the .text section is about 29.5MB and hence the CFI covers more than 99% of it.
Just to clarify, a 78% CFI coverage means that there's about 22% of libxul where we can't unwind from?
(In reply to Benoit Girard (:BenWa) from comment #2) Well, yes, kind of. It would mean that there was 22% of libxul where we can't use CFI to unwind, so whether in fact we can unwind depends on whether Breakpad can do it some other way: frame-pointer, or, if we allow it, stack scanning.
Is this still needed?
No, is not needed -- was only ever wishlist stuff.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.