From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYgZe-0001fR-FN for qemu-devel@nongnu.org; Mon, 20 Jun 2011 11:39:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYgZd-0007ii-85 for qemu-devel@nongnu.org; Mon, 20 Jun 2011 11:39:38 -0400 Received: from mail-gw0-f45.google.com ([74.125.83.45]:34879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYgZc-0007iV-K4 for qemu-devel@nongnu.org; Mon, 20 Jun 2011 11:39:36 -0400 Received: by gwb19 with SMTP id 19so913663gwb.4 for ; Mon, 20 Jun 2011 08:39:35 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1308557567-27600-1-git-send-email-avi@redhat.com> References: <1308557567-27600-1-git-send-email-avi@redhat.com> Date: Mon, 20 Jun 2011 16:39:35 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] Optimize screendump List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org 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. =A0This is due to fputc() locking the f= ile > 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: drop unportable fputc_unlocked > > =A0hw/vga.c | =A0 13 ++++++++++--- > =A01 files changed, 10 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi