From 36817ecba83b2b5f9dec783d76c5c8037f62282e Mon Sep 17 00:00:00 2001 Message-Id: <36817ecba83b2b5f9dec783d76c5c8037f62282e.1349887753.git.minovotn@redhat.com> In-Reply-To: <8366ff5a206b0f75edd17a4a78f7c389ebb81d49.1349887753.git.minovotn@redhat.com> References: <8366ff5a206b0f75edd17a4a78f7c389ebb81d49.1349887753.git.minovotn@redhat.com> From: Alon Levy Date: Sun, 7 Oct 2012 14:26:45 +0200 Subject: [PATCH 07/11] qxl-logger: add timestamp to command log RH-Author: Alon Levy Message-id: <1349620009-26192-4-git-send-email-alevy@redhat.com> Patchwork-id: 42771 O-Subject: [PATCH RHEL-6.4 v2 3/7] qxl-logger: add timestamp to command log Bugzilla: 820136 RH-Acked-by: Gerd Hoffmann RH-Acked-by: Paolo Bonzini RH-Acked-by: Uri Lublin Signed-off-by: Gerd Hoffmann Upstream: 1f0ff2fb99eb5043ea38474c961e0fb9f6ff8a63 Changes: no qemu_clock_get_ns, replaced with qemu_clock_get. (only used for printing, resolution not critical). --- hw/qxl-logger.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Signed-off-by: Michal Novotny --- hw/qxl-logger.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/qxl-logger.c b/hw/qxl-logger.c index 76f43e6..95bf38b 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(vm_clock), + qxl->id, ring); fprintf(stderr, " cmd @ 0x%" PRIx64 " %s%s", ext->cmd.data, qxl_name(qxl_type, ext->cmd.type), compat ? "(compat)" : ""); -- 1.7.11.4