-
Notifications
You must be signed in to change notification settings - Fork 14
Description
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.)