From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=58394 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7nBE-0007Ao-Kt for qemu-devel@nongnu.org; Mon, 18 Oct 2010 06:43:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7nBD-0002d0-NP for qemu-devel@nongnu.org; Mon, 18 Oct 2010 06:43:00 -0400 Received: from mtagate3.uk.ibm.com ([194.196.100.163]:38213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7nBD-0002cb-G9 for qemu-devel@nongnu.org; Mon, 18 Oct 2010 06:42:59 -0400 Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id o9IAgtrm003241 for ; Mon, 18 Oct 2010 10:42:55 GMT Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9IAgtvI3657818 for ; Mon, 18 Oct 2010 11:42:55 +0100 Received: from d06av07.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o9IAgt3K023391 for ; Mon, 18 Oct 2010 04:42:55 -0600 Date: Mon, 18 Oct 2010 11:42:34 +0100 From: Stefan Hajnoczi Message-ID: <20101018104233.GB2322@stefan-thinkpad.transitives.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [Qemu-devel] Re: [PATCH] qemu-timer: move commonly used timer code to qemu-timer-common List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel On Sun, Oct 17, 2010 at 01:50:33PM +0000, Blue Swirl wrote: > Move timer init functions to a new file, qemu-timer-common.c. Make other > critical timer functions inlined to preserve performance in > qemu-timer.c, also move muldiv64() (used by the inline functions) > to qemu-timer.h. > > Adjust block/raw-posix.c and simpletrace.c to use get_clock() directly. > Remove a similar/duplicate definition in qemu-tool.c. > > Adjust hw/omap_clk.c to include qemu-timer.h because muldiv64() is used > there. > > After this change, tracing can be used also for user code and > simpletrace on Win32. > > Cc: Stefan Hajnoczi > Signed-off-by: Blue Swirl > --- > Makefile | 6 ++-- > Makefile.objs | 3 +- > block/raw-posix.c | 12 ++++---- > hw/omap_clk.c | 1 + > qemu-common.h | 2 - > qemu-timer-common.c | 62 ++++++++++++++++++++++++++++++++++++++++++ > qemu-timer.c | 73 -------------------------------------------------- > qemu-timer.h | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++ > qemu-tool.c | 7 ----- > simpletrace.c | 10 +----- > vl.c | 24 ---------------- > 11 files changed, 150 insertions(+), 124 deletions(-) > create mode 100644 qemu-timer-common.c Acked-by: Stefan Hajnoczi