From 0c7d440070af4caf092ad83a3d3ed4d521fccaa2 Mon Sep 17 00:00:00 2001 From: Ionela Voinescu Date: Thu, 7 Dec 2017 16:23:38 +0000 Subject: [PATCH] gem5power: fix gem5power get_data after channel rename active_sites is used instead of sites_to_match and that results in "KeyError: 'timestamp'" when parsing the statistics file. 'sim_seconds' should be used instead of 'timestamp'. Signed-off-by: Ionela Voinescu --- devlib/instrument/gem5power.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlib/instrument/gem5power.py b/devlib/instrument/gem5power.py index 4b145d9..b2a4337 100644 --- a/devlib/instrument/gem5power.py +++ b/devlib/instrument/gem5power.py @@ -72,7 +72,7 @@ class Gem5PowerInstrument(Instrument): sites_to_match = [self.site_mapping.get(s, s) for s in active_sites] for rec, rois in self.target.gem5stats.match_iter(sites_to_match, [self.roi_label], self._base_stats_dump): - writer.writerow([rec[s] for s in active_sites]) + writer.writerow([rec[s] for s in sites_to_match]) return MeasurementsCsv(outfile, self.active_channels, self.sample_rate_hz) def reset(self, sites=None, kinds=None, channels=None):