the unshared text segment in the server is needlessly large. many tables and structures are not marked const even though they are never modified. LBX is the worst offender by far with about 140k of writable data. attached patch cleans up the worst of the damage in the server core. before and after: text data bss dec hex filename 1798965 25672 73696 1898333 1cf75d Xorg.after 1643170 182500 73696 1899366 1cfb66 Xorg.before
Created attachment 2667 [details] [review] constify-server-core-1.patch
One additional change, which we've been using since Solaris 8 with no noticable downside is to tell lbxutil to use "const" flags when building the tables it generates at build time: In xc/lib/lbxutil/image/Imakefile, change" RunProgram(MKG3STATES,> g3_states_h) to RunProgram(MKG3STATES,-c > g3_states_h) That was good for about 140k moving from .data to .rodata in our builds.
added. hm, wonder if there's a similar flag for fontutil.
*** Bug 3356 has been marked as a duplicate of this bug. ***
Created attachment 2729 [details] [review] constify-server-core-2.patch hit a few more subsystems from last time: fontfile, composite, damage, fixes, render, more of the loader, the config parser, etc. new size(1) numbers: text data bss dec hex filename 1806232 18248 73696 1898176 1cf6c0 Xorg this one breaks Xdmx because i was a bit enthusiatic about removing a declaration from one header, but wanted to checkpoint it.
Created attachment 2804 [details] [review] constify-server-core-4.patch hit a few more extensions, and back out overagressive consting in libfontenc (otherwise mkfontscale segfaults trying to write to .rodata). pretty confident in this version.
This looks good - are you going to commit before RC1 to get wider testing?
more or less fixed in head, but still fixing as i go.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.