Skip to content

libdwarf is slow -- use libdw instead #12

@stephenrkell

Description

@stephenrkell

Reading DIEs through libdwarf is a bit of a performance bottleneck, because it does memory allocation very frequently.

It would be better to use libdw (from elfutils), which more sensibly just memory-maps the file and issues DIEs as pointers/offsets into it. To do so, some cleanup is necessary to remove the last vestiges of libdwarf-specific code.

(Note that we still expect to depend on libdwarf's libdwarf.h -- it has a nice structure where the DW_* constants are #define'd, each on one line. This is used for generating specialised header files that omit certain vendor extensions. The dwarf.h in libdw uses enums, which are much less convenient for this. Of course the definitions are equivalent, so we can include libdw's dwarf.h internally from our code, but use libdwarf's for our generation purposes.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions