Closed Bug 1539574 Opened 3 years ago Closed 3 years ago

don't emit unnecessary PUBLIC lines in breakpad symbol files for Linux/Android


(Toolkit :: Crash Reporting, enhancement)

Not set



Tracking Status
firefox68 --- fixed


(Reporter: froydnj, Assigned: froydnj)



(1 file, 1 obsolete file)

We already emit FUNC lines for all of these, so the PUBLIC lines are just wasting space.

Module::AddFunction assumes that any time we add a function, it is
preferable to use that instead of the corresponding external
symbol (which could be anything). The former show up in Breakpad symbol
files as FUNC lines, and the latter as PUBLIC lines.

For Module::AddFunction to be effective, we have to parse all the
external symbols for a module first, and then discover all the actual
functions. But the Linux symbol dumping code does the reverse: it first
parses all the DWARF information (including .debug_info, which adds any
relevant functions) and then parses the ELF symbol table. This ordering
means that we wind up emitting PUBLIC lines for which corresponding FUNC
lines already exist. These duplicate PUBLIC lines take up roughly 10%
of the size of a libxul symbol file (~30MB), and are completely unnecessary.

The fix is simple: we should reverse the order in which we parse ELF
symbols and DWARF debug information.

Pushed by
parse ELF symbols before DWARF symbols in dump_syms; r=gsvelto
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

Moved changes to the non-forked part of breakpad living under
toolkit/crashreporter/google-breakpad into separate patches that are applied
by when syncrhonizing with upstream breakpad. Because we
landed the commits directly to the sources every time we called those changes would be reverted.

Comment on attachment 9058566 [details]
Bug 1539574 - Turn the fixes in bug 1539574 and bug 524410 into breakpad patches

I put the wrong number in arcanist message :-/ Sorry for the spam.

Attachment #9058566 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.