[Spice-devel] [spice-common v2 12/13] quic: Remove undocumented 'no-inline' hack

Christophe Fergeau cfergeau at redhat.com
Wed Aug 2 09:33:32 UTC 2017


On Wed, Aug 02, 2017 at 05:26:47AM -0400, Frediano Ziglio wrote:
> > 
> > The quic code goes through a function pointer in two places in order to
> > try to prevent the compiler from inlining code. This does not say why
> > we don't want that code to be inlined. Removing this hack even made the
> > resulting object file slightly smaller (600 bytes) on my fedora 26.
> > 
> 
> I agree the hack is ugly. Was documented but looking at the code
> for me is pretty clear. Developers want to make sure that
> write_io_word is inlined while __write_io_word is not.

Yes, I got that far, but *why* was it desired? Is this just a matter
of code size? If yes, how bad was it at the time, is it better now? If
not, what was the problem this was solving? This is what I meant by
"undocumented"

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170802/04095880/attachment.sig>


More information about the Spice-devel mailing list