https://sourceware.org/bugzilla/show_bug.cgi?id=30967
--- Comment #8 from Frank Ch. Eigler <fche at redhat dot com> --- > The issue here is that we create (very) large arrays of struct Dwarf_Line_s > and we do that eagerly, see bug #27405 > So we would like to keep that struct as small as possible. Do we have an estimate about the numbers we're talking about here? The current Dwarf_Line_s object is 40 bytes long (on x86-64). Even if packing becomes less efficient, it could cost us say 2 bytes more per record. These records are packed together in allocation via realloc() et al. How many records do we see in programs of interest? readelf -wL /bin/emacs indicates about 800 thousand; libxul.so about 8 million. Is this about single digit megabytes more RAM in grand total? Note that bug #27405 was a request for optimization, not in order to save a few percent of memory for used data, but to save ALL the related memory & time for totally unused data. struct Dwarf_Line_s { Dwarf_Files * files; /* 0 8 */ Dwarf_Addr addr; /* 8 8 */ unsigned int file; /* 16 4 */ int line; /* 20 4 */ short unsigned int column; /* 24 2 */ /* Bitfield combined with previous fields */ unsigned int is_stmt:1; /* 24:16 4 */ unsigned int basic_block:1; /* 24:17 4 */ unsigned int end_sequence:1; /* 24:18 4 */ unsigned int prologue_end:1; /* 24:19 4 */ unsigned int epilogue_begin:1; /* 24:20 4 */ unsigned int op_index:8; /* 24:21 4 */ /* XXX 3 bits hole, try to pack */ /* Force alignment to the next boundary: */ unsigned int :0; unsigned int isa:8; /* 28: 0 4 */ unsigned int discriminator:24; /* 28: 8 4 */ unsigned int context; /* 32 4 */ unsigned int function_name; /* 36 4 */ /* size: 40, cachelines: 1, members: 15 */ /* sum members: 34 */ /* sum bitfield members: 45 bits, bit holes: 1, sum bit holes: 3 bits */ /* last cacheline: 40 bytes */ }; -- You are receiving this mail because: You are on the CC list for the bug.