From 05857ec2bc52190ed4872f78bddfd49c94b5cafc Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Fri, 10 Jan 2020 13:26:34 +0000 Subject: [PATCH] utils/cpustates: update idle state naming If idle state names for a cpu could not be discovered, use "idle[N]" where N is the state number, instead of just making them all as "unknown". --- wa/utils/cpustates.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wa/utils/cpustates.py b/wa/utils/cpustates.py index 7dc4f8f0..fe088f05 100755 --- a/wa/utils/cpustates.py +++ b/wa/utils/cpustates.py @@ -368,8 +368,10 @@ class PowerStateTimeline(object): if frequency is None: if idle_state == -1: row.append('Running (unknown kHz)') - elif idle_state is None or not self.idle_state_names[cpu_idx]: + elif idle_state is None: row.append('unknown') + elif not self.idle_state_names[cpu_idx]: + row.append('idle[{}]'.format(idle_state)) else: row.append(self.idle_state_names[cpu_idx][idle_state]) else: # frequency is not None