[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/12] qemu-timer: more clock functions
From: |
Lluís Vilanova |
Subject: |
Re: [Qemu-devel] [PATCH 03/12] qemu-timer: more clock functions |
Date: |
Fri, 30 Sep 2011 14:15:27 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
Paolo Bonzini writes:
> On 09/30/2011 12:52 PM, Lluís Vilanova wrote:
>> Paolo Bonzini writes:
>>
>>> These will be used when moving icount accounting to cpus.c.
>>
>> I have something related to this kind of refactoring. While trying to
>> understand
>> all the timing facilities in QEMU, I wrote some (unfinished) patches that
>> try to
>> disentangle much of the code in qemu-timer into two new files:
>>
>> - qemu-htime: Provides routines related to time in the host.
>> - qemu-vtime: Provides routines related to time in the guest.
>>
>> These patches also try to sanitize some routine names by making their domain
>> 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 that 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
--
"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
- [Qemu-devel] [PATCH 00/12] allow tools to use the QEMU main loop, Paolo Bonzini, 2011/09/27
- [Qemu-devel] [PATCH 06/12] qemu-timer: use atexit for quit_timers, Paolo Bonzini, 2011/09/27
- [Qemu-devel] [PATCH 02/12] qemu-timer: move common code to qemu_rearm_alarm_timer, Paolo Bonzini, 2011/09/27
- [Qemu-devel] [PATCH 05/12] qemu-timer: do not refer to runstate_is_running(), Paolo Bonzini, 2011/09/27
- [Qemu-devel] [PATCH 04/12] qemu-timer: move icount to cpus.c, Paolo Bonzini, 2011/09/27
- [Qemu-devel] [PATCH 07/12] qemu-timer: move more stuff out of qemu-timer.c, Paolo Bonzini, 2011/09/27
- [Qemu-devel] [PATCH 12/12] simplify main loop functions, Paolo Bonzini, 2011/09/27
- [Qemu-devel] [PATCH 11/12] Revert to a hand-made select loop, Paolo Bonzini, 2011/09/27
- [Qemu-devel] [PATCH 10/12] create main-loop.c, Paolo Bonzini, 2011/09/27
- [Qemu-devel] [PATCH 08/12] qemu-timer: do not use RunState change handlers, Paolo Bonzini, 2011/09/27
- [Qemu-devel] [PATCH 09/12] create main-loop.h, Paolo Bonzini, 2011/09/27