Skip to content

Unnecessary eager DWARF section decompression #1592

Description

@d-e-s-o

gimli and its DwarfSections type specifically work in an eager fashion: when an instance is created it proactively reads all ELF sections. For uncompressed ELF files that should be fine, it's just a bunch of pointer juggling on the mmap'ed data. However, when sections are compressed, what ends up happening is that we eagerly decompress them. For data that is never used, e.g., .debug_loclists, this can mean a bunch of unnecessary work and, similarly, unnecessary memory usage.

Alas, I don't think it's easy to fix. We could skip sections that we know we don't use, but maintaining such a list is fragile and prone to become outdated. The cleaner approach would be to make this lazy, which would require a custom gimli reader. However, that stuff is somewhat performance sensitive on its own (example), so we'd need to see that we don't regress the general uncompressed file case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions