You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.)
The text was updated successfully, but these errors were encountered:
To remove the dependency on libdwarf entirely, while still generating header files as at present, a cute trick would be to bootstrap the header file generation using libdw itself. From the DWARF info of libdw, we can get at its enum definitions in a structured way, e.g. by dwarfdumping it and lightly sedding the output.
I have done some work on the use-libdw branch, although it does not work yet.
Note also that that branch replaces libdwarf with libdw, but in hindsight it should be a configure-time choice. I will go back and parameterise that once the main body of the work is done.
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.)
The text was updated successfully, but these errors were encountered: