[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v6 3/4] cpu-timers, icount: new modules
From: |
Thomas Huth |
Subject: |
Re: [RFC v6 3/4] cpu-timers, icount: new modules |
Date: |
Fri, 19 Jun 2020 07:54:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
On 18/06/2020 21.04, Claudio Fontana wrote:
> refactoring of cpus.c continues with cpu timer state extraction.
>
> cpu-timers: responsible for the cpu timers state, and for access to
> cpu clocks and ticks.
>
> icount: counts the TCG instructions executed. As such it is specific to
> the TCG accelerator. Therefore, it is built only under CONFIG_TCG.
>
> One complication is due to qtest, which misuses icount to warp time
> (qtest_clock_warp). In order to solve this problem, detach instead qtest
> from icount, and use a trivial separate counter for it.
>
> This requires fixing assumptions scattered in the code that
> qtest_enabled() implies icount_enabled().
>
> No functionality change.
>
> Signed-off-by: Claudio Fontana <cfontana@suse.de>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> MAINTAINERS | 2 +
> accel/qtest.c | 6 +-
> accel/tcg/cpu-exec.c | 43 ++-
> accel/tcg/tcg-all.c | 7 +-
> accel/tcg/translate-all.c | 3 +-
> docs/replay.txt | 6 +-
> exec.c | 4 -
> hw/core/ptimer.c | 8 +-
> hw/i386/x86.c | 1 +
> include/exec/cpu-all.h | 4 +
> include/exec/exec-all.h | 4 +-
> include/qemu/timer.h | 22 +-
> include/sysemu/cpu-timers.h | 81 +++++
> include/sysemu/cpus.h | 12 +-
> include/sysemu/qtest.h | 2 +
> include/sysemu/replay.h | 4 +-
> replay/replay.c | 6 +-
> softmmu/Makefile.objs | 2 +
> softmmu/cpu-timers.c | 284 ++++++++++++++++
> softmmu/cpus.c | 750
> +------------------------------------------
> softmmu/icount.c | 499 ++++++++++++++++++++++++++++
> softmmu/qtest.c | 34 +-
> softmmu/timers-state.h | 69 ++++
> softmmu/vl.c | 8 +-
> stubs/Makefile.objs | 3 +-
> stubs/clock-warp.c | 4 +-
> stubs/cpu-get-clock.c | 3 +-
> stubs/cpu-get-icount.c | 21 --
> stubs/icount.c | 22 ++
> stubs/qemu-timer-notify-cb.c | 8 +
> stubs/qtest.c | 5 +
> target/alpha/translate.c | 3 +-
> target/arm/helper.c | 7 +-
> target/riscv/csr.c | 8 +-
> tests/ptimer-test-stubs.c | 7 +-
> tests/test-timed-average.c | 2 +-
> util/main-loop.c | 4 +-
> util/qemu-timer.c | 12 +-
> 38 files changed, 1119 insertions(+), 851 deletions(-)
> create mode 100644 include/sysemu/cpu-timers.h
> create mode 100644 softmmu/cpu-timers.c
> create mode 100644 softmmu/icount.c
> create mode 100644 softmmu/timers-state.h
> delete mode 100644 stubs/cpu-get-icount.c
> create mode 100644 stubs/icount.c
> create mode 100644 stubs/qemu-timer-notify-cb.c
This is missing a modification to dma-helpers.c that also uses
use_icount (see the mail from patchew).
Thomas
- [RFC v6 0/4] QEMU cpus.c refactoring, Claudio Fontana, 2020/06/18
- [RFC v6 2/4] cpu-throttle: new module, extracted from cpus.c, Claudio Fontana, 2020/06/18
- [RFC v6 3/4] cpu-timers, icount: new modules, Claudio Fontana, 2020/06/18
- Re: [RFC v6 3/4] cpu-timers, icount: new modules,
Thomas Huth <=
- [RFC v6 1/4] softmmu: move softmmu only files from root, Claudio Fontana, 2020/06/18
- [RFC v6 4/4] cpus: extract out accel-specific code to each accel, Claudio Fontana, 2020/06/18
- Re: [RFC v6 0/4] QEMU cpus.c refactoring, no-reply, 2020/06/18
- Re: [RFC v6 0/4] QEMU cpus.c refactoring, no-reply, 2020/06/18
- Re: [RFC v6 0/4] QEMU cpus.c refactoring, no-reply, 2020/06/18