Received: from eggs.gnu.org ([140.186.70.92]:54505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9c07-0005Dr-Bv for qemu-devel@nongnu.org; Fri, 30 Sep 2011 08:15:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9c05-00028T-Qg for qemu-devel@nongnu.org; Fri, 30 Sep 2011 08:15:35 -0400 Received: from gw.ac.upc.edu ([147.83.30.3]:36258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9c05-00027r-It for qemu-devel@nongnu.org; Fri, 30 Sep 2011 08:15:33 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <1317141111-27701-1-git-send-email-pbonzini@redhat.com> <1317141111-27701-4-git-send-email-pbonzini@redhat.com> <87ipoa5mkt.fsf@ginnungagap.bsc.es> <4E85A21E.7010408@redhat.com> Date: Fri, 30 Sep 2011 14:15:27 +0200 In-Reply-To: <4E85A21E.7010408@redhat.com> (Paolo Bonzini's message of "Fri, 30 Sep 2011 13:03:58 +0200") Message-ID: <87ehyy5iqo.fsf@ginnungagap.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 03/12] qemu-timer: more clock functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Paolo Bonzini writes: > On 09/30/2011 12:52 PM, Llu=C3=ADs Vilanova wrote: >> Paolo Bonzini writes: >>=20 >>> These will be used when moving icount accounting to cpus.c. >>=20 >> I have something related to this kind of refactoring. While trying to un= derstand >> all the timing facilities in QEMU, I wrote some (unfinished) patches tha= t try to >> disentangle much of the code in qemu-timer into two new files: >>=20 >> - qemu-htime: Provides routines related to time in the host. >> - qemu-vtime: Provides routines related to time in the guest. >>=20 >> These patches also try to sanitize some routine names by making their do= main and >> units explicit (e.g., get_clock becomes qemu_htime_nsec and cpu_get_ticks >> becomes qemu_vtime_tsc). > That's almost unnecessary, get_clock should be just > qemu_get_clock_ns(host_clock) or something like that. The problem is tha= t the > clock names are impossible to remember. :) Yes, that was the main point of my refactoring :) > However, making it clear from the name whether get_clock refers to the > host_clock or rt_clock can be a useful cleanup. Well, then maybe I will resume that work after 1.0. Lluis --=20 "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth