From patchwork Fri Jan 20 11:05:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 137012 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 F15811007D5 for ; Fri, 20 Jan 2012 22:30:41 +1100 (EST) Received: from localhost ([::1]:37754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoCI8-00008i-Pe for incoming@patchwork.ozlabs.org; Fri, 20 Jan 2012 06:05:56 -0500 Received: from eggs.gnu.org ([140.186.70.92]:41783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoCHt-0008Tl-Ml for qemu-devel@nongnu.org; Fri, 20 Jan 2012 06:05:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoCHn-0006g8-01 for qemu-devel@nongnu.org; Fri, 20 Jan 2012 06:05:41 -0500 Received: from mail-ww0-f41.google.com ([74.125.82.41]:46860) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoCHm-0006fx-JZ; Fri, 20 Jan 2012 06:05:34 -0500 Received: by wgbdt11 with SMTP id dt11so486312wgb.4 for ; Fri, 20 Jan 2012 03:05:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=2JIJsUE8XA24aw+wujv89R+OVEW8gihEDOu6GUw8ans=; b=WVm1totgCruOI9MaWAEzC2Y+b1A3Iv/Hy0kK22HQ49LPkqtaIzrGlPi4SuooR7JQjg 57t4/7xavgzJaiQS0rF8Ayt1316RMX+g33lvQ0RjiDAlm2hWB2ZL51UGHVSFG7GzrdIO FPeVKfaDTX3jT/NcV3d8w5JsMBgRo9PLIia24= Received: by 10.180.106.38 with SMTP id gr6mr2947757wib.0.1327057533788; Fri, 20 Jan 2012 03:05:33 -0800 (PST) Received: from localhost.localdomain (93-34-200-238.ip51.fastwebnet.it. [93.34.200.238]) by mx.google.com with ESMTPS id fv6sm7848260wib.8.2012.01.20.03.05.32 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 Jan 2012 03:05:33 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 20 Jan 2012 12:05:22 +0100 Message-Id: <1327057522-6590-2-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.7.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.41 Cc: qemu-trivial@nongnu.org Subject: [Qemu-devel] [PATCH] remove #if 0 code for timers 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 Signed-off-by: Paolo Bonzini --- qemu-timer.c | 29 ----------------------------- 1 files changed, 0 insertions(+), 29 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 4a14a6d..8dc0d8a 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);