[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 01/14] cpu-timers, icount: new modules
From: |
Richard Henderson |
Subject: |
Re: [PATCH v5 01/14] cpu-timers, icount: new modules |
Date: |
Fri, 14 Aug 2020 13:20:23 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 8/12/20 11:32 AM, Claudio Fontana wrote:
> +/*
> + * Return the icount enablement state:
> + *
> + * 0 = Disabled - Do not count executed instructions.
> + * 1 = Enabled - Fixed conversion of insn to ns via "shift" option
> + * 2 = Enabled - Runtime adaptive algorithm to compute shift
> + */
> +int icount_enabled(void);
Why does use_icount need to change to a function?
If it does, or even if this just comes under the heading of cleanup, it should
certainly be done in a separate patch.
Either way, I think we should expose the fact that this is always disabled when
#ifndef CONFIG_TCG, just like we do for tcg_enabled().
> - if (use_icount) {
> - return cpu_get_icount();
> + if (icount_enabled()) {
> + return icount_get();
Renaming of other functions like this should also be done in a separate patch.
r~
- [PATCH v5 00/14] QEMU cpus.c refactoring part2, Claudio Fontana, 2020/08/12
- [PATCH v5 01/14] cpu-timers, icount: new modules, Claudio Fontana, 2020/08/12
- Re: [PATCH v5 01/14] cpu-timers, icount: new modules,
Richard Henderson <=
- [PATCH v5 04/14] cpus: extract out qtest-specific code to accel/qtest, Claudio Fontana, 2020/08/12
- [PATCH v5 02/14] cpus: prepare new CpusAccel cpu accelerator interface, Claudio Fontana, 2020/08/12
- [PATCH v5 03/14] cpus: extract out TCG-specific code to accel/tcg, Claudio Fontana, 2020/08/12
- [PATCH v5 06/14] cpus: extract out hax-specific code to target/i386/, Claudio Fontana, 2020/08/12