Re: [PATCH 4/5] do not compile dump_bitmap if not necessary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> 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@xxxxxxxxxx>
> > ---
> >  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@xxxxxxxxxx>
> 

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@xxxxxxxxxxxxxxxxxxxxx
> > https://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]