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~