Re: [Qemu-devel] [PATCH v2] Optimize screendump

2011-06-26 Thread Blue Swirl
On Thu, Jun 23, 2011 at 12:22 AM, Andreas Färber wrote: > Am 20.06.2011 um 15:11 schrieb Avi Kivity: > >> On 06/20/2011 03:33 PM, Jan Kiszka wrote: >>> >>> >  --- a/hw/vga.c >>> >  +++ b/hw/vga.c >>> >  @@ -2349,15 +2349,19 @@ int ppm_save(const char *filename, struct >>> > DisplaySurface *ds) >>

Re: [Qemu-devel] [PATCH v2] Optimize screendump

2011-06-22 Thread Andreas Färber
Am 20.06.2011 um 15:11 schrieb Avi Kivity: On 06/20/2011 03:33 PM, Jan Kiszka wrote: > --- a/hw/vga.c > +++ b/hw/vga.c > @@ -2349,15 +2349,19 @@ int ppm_save(const char *filename, struct DisplaySurface *ds) Unrelated to this patch, but why is this function located in vga.c and not in

Re: [Qemu-devel] [PATCH v2] Optimize screendump

2011-06-22 Thread Anthony Liguori
On 06/20/2011 03:12 AM, Avi Kivity wrote: When running kvm-autotest, fputc() is often the second highest (sometimes #1) function showing up in a profile. This is due to fputc() locking the file for every byte written. Optimize by buffering a line's worth of pixels and writing that out in a sing

Re: [Qemu-devel] [PATCH v2] Optimize screendump

2011-06-20 Thread Stefan Hajnoczi
On Mon, Jun 20, 2011 at 9:12 AM, Avi Kivity wrote: > When running kvm-autotest, fputc() is often the second highest (sometimes #1) > function showing up in a profile.  This is due to fputc() locking the file > for every byte written. > > Optimize by buffering a line's worth of pixels and writing t

Re: [Qemu-devel] [PATCH v2] Optimize screendump

2011-06-20 Thread Avi Kivity
On 06/20/2011 03:33 PM, Jan Kiszka wrote: > --- a/hw/vga.c > +++ b/hw/vga.c > @@ -2349,15 +2349,19 @@ int ppm_save(const char *filename, struct DisplaySurface *ds) Unrelated to this patch, but why is this function located in vga.c and not in console.c? It's located in omap_lcdc.c as wel

Re: [Qemu-devel] [PATCH v2] Optimize screendump

2011-06-20 Thread Jan Kiszka
On 2011-06-20 10:12, Avi Kivity wrote: > When running kvm-autotest, fputc() is often the second highest (sometimes #1) > function showing up in a profile. This is due to fputc() locking the file > for every byte written. > > Optimize by buffering a line's worth of pixels and writing that out in a

[Qemu-devel] [PATCH v2] Optimize screendump

2011-06-20 Thread Avi Kivity
When running kvm-autotest, fputc() is often the second highest (sometimes #1) function showing up in a profile. This is due to fputc() locking the file for every byte written. Optimize by buffering a line's worth of pixels and writing that out in a single call. Signed-off-by: Avi Kivity --- v2