Hi,

two sets of changes to reduce the size of the .data.rel.ro segment in the
driver binary. This segment contains data that is supposedly read-only, but
contains relocations and must therefore be modified by the dynamic linker.
This means the segment cannot be shared between processes, and it increases
startup time.

Overall, my mega-driver binary (gallium radeon + llvmpipe drivers) changes as
follows:
- .data.rel.ro from ~450kB to ~188kB
- .rodata from ~743kB to ~841kB
- other sections are noise

The net size reduction is from having various r600 ISA tables only once in the
binary. Additionally, the register definition tables in radeonsi are used
only when the user explicitly requests them, so not having to run relocations
over them is clearly a win.

The biggest remaining chunk in .data.rel.ro are the u_format_tables at ~63kB
(they contain name pointers and function pointers). There are ~38kB of C++
virtual method tables, followed by tables from mesa/main (extensions,
glGet* support) and the r600 ISA tables, and a long tail of random stuff.

Please review!

Thanks,
Nicolai
--
 src/gallium/drivers/r600/r600_isa.c          | 515 +++++++++++++++-
 src/gallium/drivers/r600/r600_isa.h          | 517 +----------------
 .../drivers/r600/sb/sb_bc_decoder.cpp        |   6 +-
 src/gallium/drivers/radeonsi/si_debug.c      |  28 +-
 src/gallium/drivers/radeonsi/sid_tables.py   | 168 +++++-
 5 files changed, 690 insertions(+), 544 deletions(-)
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to