qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 01/14] cpu-timers, icount: new modules


From: Claudio Fontana
Subject: Re: [PATCH v5 01/14] cpu-timers, icount: new modules
Date: Wed, 19 Aug 2020 15:49:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

Hello Richard,

On 8/14/20 10:20 PM, Richard Henderson wrote:
> 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?


It is not useful at this point, I'll change this.


> 
> If it does, or even if this just comes under the heading of cleanup, it should
> certainly be done in a separate patch.


Yes, I'll move it to a different series entirely.

> 
> 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().

Will do.

> 
>> -        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.

Is there a compelling reason to separate the new module/class from what are 
effectively its methods?
It seemed to me that creating a new icount module would warrant the name 
changes in the same patch.

> 
> 
> r~
> 

I will be out of office until end of the month,

thanks,

Claudio





reply via email to

[Prev in Thread] Current Thread [Next in Thread]