From patchwork Wed Jun 29 11:57:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 102575 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C104EB6F53 for ; Wed, 29 Jun 2011 22:13:55 +1000 (EST) Received: from localhost ([::1]:50380 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbteR-0007lS-UW for incoming@patchwork.ozlabs.org; Wed, 29 Jun 2011 08:13:52 -0400 Received: from eggs.gnu.org ([140.186.70.92]:54014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbtOn-0004Oz-B3 for qemu-devel@nongnu.org; Wed, 29 Jun 2011 07:57:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbtOl-00071s-MS for qemu-devel@nongnu.org; Wed, 29 Jun 2011 07:57:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbtOl-00071i-6Y for qemu-devel@nongnu.org; Wed, 29 Jun 2011 07:57:39 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5TBvcE6029170 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 29 Jun 2011 07:57:38 -0400 Received: from bow.redhat.com (vpn-11-114.rdu.redhat.com [10.11.11.114]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p5TBvOFQ002457; Wed, 29 Jun 2011 07:57:37 -0400 From: Alon Levy To: qemu-devel@nongnu.org Date: Wed, 29 Jun 2011 13:57:13 +0200 Message-Id: <1309348641-20061-8-git-send-email-alevy@redhat.com> In-Reply-To: <1309348641-20061-1-git-send-email-alevy@redhat.com> References: <1309348641-20061-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: yhalperi@redhat.com, kraxel@redhat.com Subject: [Qemu-devel] [PATCHv3] qxl-logger: add timestamp to command log X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org --- hw/qxl-logger.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/qxl-logger.c b/hw/qxl-logger.c index 76f43e6..74cadba 100644 --- a/hw/qxl-logger.c +++ b/hw/qxl-logger.c @@ -19,6 +19,7 @@ * along with this program; if not, see . */ +#include "qemu-timer.h" #include "qxl.h" static const char *qxl_type[] = { @@ -223,7 +224,8 @@ void qxl_log_command(PCIQXLDevice *qxl, const char *ring, QXLCommandExt *ext) if (!qxl->cmdlog) { return; } - fprintf(stderr, "qxl-%d/%s:", qxl->id, ring); + fprintf(stderr, "%ld qxl-%d/%s:", qemu_get_clock_ns(vm_clock), + qxl->id, ring); fprintf(stderr, " cmd @ 0x%" PRIx64 " %s%s", ext->cmd.data, qxl_name(qxl_type, ext->cmd.type), compat ? "(compat)" : "");