Re: [rteval PATCH 1/2] rteval: cyclictest.py: Make 'model name' optional

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

 




On Tue, 26 Jan 2021, Punit Agrawal wrote:

> Certain architectures such as arm64 don't have a "model name" in
> /proc/cpuinfo. Relax the requirement to include the model name in the
> description to allow running rteval on such machines.
> 
> Signed-off-by: Punit Agrawal <punit1.agrawal@xxxxxxxxxxxxx>
> ---
>  rteval/modules/measurement/cyclictest.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/rteval/modules/measurement/cyclictest.py b/rteval/modules/measurement/cyclictest.py
> index 232bd6b..afe87f7 100644
> --- a/rteval/modules/measurement/cyclictest.py
> +++ b/rteval/modules/measurement/cyclictest.py
> @@ -217,13 +217,13 @@ class Cyclictest(rtevalModulePrototype):
>          for core in self.__cpus:
>              self.__cyclicdata[core] = RunData(core, 'core', self.__priority,
>                                                logfnc=self._log)
> -            self.__cyclicdata[core].description = info[core]['model name']
> +            self.__cyclicdata[core].description = info[core].get('model name', '')
>  
>          # Create a RunData object for the overall system
>          self.__cyclicdata['system'] = RunData('system',
>                                                'system', self.__priority,
>                                                logfnc=self._log)
> -        self.__cyclicdata['system'].description = ("(%d cores) " % self.__numcores) + info['0']['model name']
> +        self.__cyclicdata['system'].description = ("(%d cores) " % self.__numcores) + info['0'].get('model name', '')
>  
>          if self.__sparse:
>              self._log(Log.DEBUG, "system using %d cpu cores" % self.__numcores)
> -- 
> 2.29.2
> 
> 

Conceptually this is okay. Maybe we should set a default name of 'unknown' 
instead of an empty string? Also could you please log the situation when 
it occurs - perhaps INFO level?

Thanks

John



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux