breakpad: Dwarf CFI reader: generate simple coverage statistics

RESOLVED WONTFIX

Status

()

defect
RESOLVED WONTFIX
6 years ago
3 years ago

People

(Reporter: jseward, Unassigned)

Tracking

Trunk
x86_64
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Reporter

Description

6 years ago
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.
Reporter

Comment 1

6 years ago
Posted patch WIP patchSplinter Review
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?
Reporter

Comment 3

6 years ago
(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.
Blocks: 863453
Is this still needed?
Flags: needinfo?(jseward)
Reporter

Comment 5

3 years ago
No, is not needed -- was only ever wishlist stuff.
Flags: needinfo?(jseward)
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.