1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-19 12:24:32 +00:00

cpustates: fix idle state assumption on freq transition

If a frequency transition is observed before an idle state can be
established, assume idle state is -1 (i.e. the core is running). This
will ensure correct stats for platforms with disabled cpuidle.
This commit is contained in:
Sergei Trofimov 2017-06-20 15:48:51 +01:00
parent 51db53d979
commit 9bd745b347

View File

@ -212,6 +212,8 @@ class PowerStateProcessor(object):
self.current_time = event.timestamp self.current_time = event.timestamp
if event.idle_state is None: if event.idle_state is None:
self.cpu_states[event.cpu_id].frequency = event.frequency self.cpu_states[event.cpu_id].frequency = event.frequency
if self.cpu_states[event.cpu_id].idle_state is None:
self.cpu_states[event.cpu_id].idle_state = -1
else: else:
if event.idle_state == -1: if event.idle_state == -1:
self._process_idle_exit(event) self._process_idle_exit(event)