From 4bb42551f4241d2c76c0283a76a7a72e6906e011 Mon Sep 17 00:00:00 2001 From: Leonard Crestez Date: Mon, 18 Dec 2017 18:23:21 +0200 Subject: [PATCH 1/2] TestEnv._init_platform: Remove nrg_model key from platform if None There are checks like if "nrg_model" in platform but they return True if a None value is present. So make such that such a value is never present. Signed-off-by: Leonard Crestez --- libs/utils/env.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/utils/env.py b/libs/utils/env.py index 013f44f99..5ea783b1f 100644 --- a/libs/utils/env.py +++ b/libs/utils/env.py @@ -797,6 +797,9 @@ class TestEnv(ShareState): else: self.platform['nrg_model'] = self._load_em(self.conf['board']) + if self.platform['nrg_model'] is None: + del self.platform['nrg_model'] + # Adding topology information self.platform['topology'] = self.topology.get_level("cluster") -- GitLab From fe1385ea940f3b5410850bbb650ea98db3c033a4 Mon Sep 17 00:00:00 2001 From: Leonard Crestez Date: Mon, 18 Dec 2017 19:07:50 +0200 Subject: [PATCH 2/2] AnalysisModule: Initialize _big_cpus/_little_cpus even w/o nrg_model This makes stuff like plotClusterFrequencies work even if no nrg_model is available. Signed-off-by: Leonard Crestez --- libs/utils/analysis_module.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/utils/analysis_module.py b/libs/utils/analysis_module.py index 987e21307..da3ca6a73 100644 --- a/libs/utils/analysis_module.py +++ b/libs/utils/analysis_module.py @@ -53,6 +53,9 @@ class AnalysisModule(object): if self._trace.has_big_little: self._little_cap = self._platform['nrg_model']['little']['cpu']['cap_max'] + + if ('big' in self._platform['clusters'] and + 'little' in self._platform['clusters']): self._big_cpus = self._platform['clusters']['big'] self._little_cpus = self._platform['clusters']['little'] -- GitLab