[Spice-devel] [RFC PATCH 01/16] OT: small optimization
Frediano Ziglio
fziglio at redhat.com
Wed Jan 25 14:27:42 UTC 2017
>
> No commit log, no real-world performance measurements showing this is needed,
> ...
>
Not much
Before:
text data bss dec hex filename
549352 904 1384 551640 86ad8 (TOTALS)
After:
text data bss dec hex filename
549247 904 1384 551535 86a6f (TOTALS)
(should probably have removed the OT patches)
Frediano
> On Wed, Jan 25, 2017 at 12:42:24PM +0000, Frediano Ziglio wrote:
> > ---
> > server/char-device.c | 6 ------
> > server/char-device.h | 6 +++++-
> > 2 files changed, 5 insertions(+), 7 deletions(-)
> >
> > diff --git a/server/char-device.c b/server/char-device.c
> > index c40ed65..7c86f76 100644
> > --- a/server/char-device.c
> > +++ b/server/char-device.c
> > @@ -976,12 +976,6 @@ SpiceServer* red_char_device_get_server(RedCharDevice
> > *dev)
> > return dev->priv->reds;
> > }
> >
> > -SpiceCharDeviceInterface
> > *spice_char_device_get_interface(SpiceCharDeviceInstance *instance)
> > -{
> > - return SPICE_UPCAST(SpiceCharDeviceInterface, instance->base.sif);
> > -}
> > -
> > -
> > static void red_char_device_init_device_instance(RedCharDevice *self)
> > {
> > SpiceCharDeviceInterface *sif;
> > diff --git a/server/char-device.h b/server/char-device.h
> > index 3b87023..761ff2b 100644
> > --- a/server/char-device.h
> > +++ b/server/char-device.h
> > @@ -236,6 +236,10 @@ RedCharDevice *spicevmc_device_connect(RedsState
> > *reds,
> > void spicevmc_device_disconnect(RedsState *reds,
> > SpiceCharDeviceInstance *char_device);
> >
> > -SpiceCharDeviceInterface
> > *spice_char_device_get_interface(SpiceCharDeviceInstance *instance);
> > +static inline SpiceCharDeviceInterface *
> > +spice_char_device_get_interface(SpiceCharDeviceInstance *instance)
> > +{
> > + return SPICE_UPCAST(SpiceCharDeviceInterface, instance->base.sif);
> > +}
> >
> > #endif // CHAR_DEVICE_H_
More information about the Spice-devel
mailing list