[Spice-devel] [PATCH 4/5] do not compile dump_bitmap if not necessary
Frediano Ziglio
fziglio at redhat.com
Thu Mar 24 13:25:46 UTC 2016
>
> Hi,
>
> On Thu, Mar 24, 2016 at 08:53:01AM +0000, Frediano Ziglio wrote:
> > This function is used only for debugging
> >
> > Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> > ---
> > server/spice-bitmap-utils.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/server/spice-bitmap-utils.c b/server/spice-bitmap-utils.c
> > index d13d757..a423ad9 100644
> > --- a/server/spice-bitmap-utils.c
> > +++ b/server/spice-bitmap-utils.c
> > @@ -135,6 +135,7 @@ int spice_bitmap_from_surface_type(uint32_t
> > surface_format)
> > return 0;
> > }
> >
> > +#ifdef DUMP_BITMAP
>
> Oh, but I wish we had better ways to filter-out debug information ;)
>
> Acked-by: Victor Toso <victortoso at redhat.com>
>
Yes, for this particular piece of debugging which is quite small and
is just a call to a debug function (so take very few cpu) would be
better to always compile and enable in some way (like an environment
variable) instead of having to recompile
Frediano
> > #define RAM_PATH "/tmp/tmpfs"
> >
> > static void put_16le(uint8_t **ptr, uint16_t val)
> > @@ -303,3 +304,4 @@ write_err:
> > fclose(f);
> > remove(file_str);
> > }
> > +#endif
> > --
> > 2.5.5
> >
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/spice-devel
>
More information about the Spice-devel
mailing list