From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqgEb-0006Di-RK for qemu-devel@nongnu.org; Fri, 27 Jan 2012 02:28:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqgET-0008Sk-Or for qemu-devel@nongnu.org; Fri, 27 Jan 2012 02:28:33 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:57022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqgET-0008SX-Gk for qemu-devel@nongnu.org; Fri, 27 Jan 2012 02:28:25 -0500 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Jan 2012 07:28:23 -0000 Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by d06nrmr1407.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q0R7SLba2527402 for ; Fri, 27 Jan 2012 07:28:21 GMT Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q0R7SK7Y021147 for ; Fri, 27 Jan 2012 00:28:21 -0700 From: Stefan Hajnoczi Date: Fri, 27 Jan 2012 07:27:57 +0000 Message-Id: <1327649282-12431-2-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1327649282-12431-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1327649282-12431-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 1/6] remove #if 0 code for timers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Paolo Bonzini , qemu-devel@nongnu.org, Stefan Hajnoczi From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- qemu-timer.c | 29 ----------------------------- 1 files changed, 0 insertions(+), 29 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index cd026c6..a22f27e 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -494,35 +494,6 @@ static void host_alarm_handler(int host_signum) if (!t) return; -#if 0 -#define DISP_FREQ 1000 - { - static int64_t delta_min = INT64_MAX; - static int64_t delta_max, delta_cum, last_clock, delta, ti; - static int count; - ti = qemu_get_clock_ns(vm_clock); - if (last_clock != 0) { - delta = ti - last_clock; - if (delta < delta_min) - delta_min = delta; - if (delta > delta_max) - delta_max = delta; - delta_cum += delta; - if (++count == DISP_FREQ) { - printf("timer: min=%" PRId64 " us max=%" PRId64 " us avg=%" PRId64 " us avg_freq=%0.3f Hz\n", - muldiv64(delta_min, 1000000, get_ticks_per_sec()), - muldiv64(delta_max, 1000000, get_ticks_per_sec()), - muldiv64(delta_cum, 1000000 / DISP_FREQ, get_ticks_per_sec()), - (double)get_ticks_per_sec() / ((double)delta_cum / DISP_FREQ)); - count = 0; - delta_min = INT64_MAX; - delta_max = 0; - delta_cum = 0; - } - } - last_clock = ti; - } -#endif if (alarm_has_dynticks(t) || qemu_next_alarm_deadline () <= 0) { t->expired = alarm_has_dynticks(t); -- 1.7.8.3