[Xcb] [PATCH 1/2] Don't declare xcb_req as static
Eric Anholt
eric at anholt.net
Wed Jun 28 17:08:42 UTC 2017
Adam Jackson <ajax at redhat.com> writes:
> Doing so forces the compiler to allocate storage for the symbol in
> .data, which means 24 bytes of dirty data and a relocation per request
> function.
>
> text data bss dec hex filename
> 88888 7136 8 96032 17720 src/.libs/libxcb-glx.so.before
> 92432 680 8 93120 16bc0 src/.libs/libxcb-glx.so.after
Increasing the executed-code size by 4% here makes me nervous -- done
any performance comparison before and after? I think that delta will
get buried under the overhead of xcb_send_request, but it would be nice
to be sure.
Is the problem just the relocations in that data? Would pulling the
req->ext out of xcb_protocol_request and passing it as another parameter
of a new xcb_send_request variant also fix it, while letting us keep the
remainder of the xcb_protocol_request_t static?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/xcb/attachments/20170628/fd786f20/attachment.sig>
More information about the Xcb
mailing list