mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 03:12:34 +01:00
cpustates: Fix for error when trying to use cpustates with hotplugged cores
It is not possible to read frequencies from a core that has been hotplugged. The code will now set the current and max frequencies of hotplugged cores to None. This still doesn't work for devices that have dynamic hotplug enabled
This commit is contained in:
@@ -153,8 +153,12 @@ class CpuStatesProcessor(ResultProcessor):
|
||||
cluster_max_freqs = {}
|
||||
self.max_freq_list = []
|
||||
for c in unique(device.core_clusters):
|
||||
cluster_freqs[c] = device.get_cluster_cur_frequency(c)
|
||||
cluster_max_freqs[c] = device.get_cluster_max_frequency(c)
|
||||
try:
|
||||
cluster_freqs[c] = device.get_cluster_cur_frequency(c)
|
||||
cluster_max_freqs[c] = device.get_cluster_max_frequency(c)
|
||||
except ValueError:
|
||||
cluster_freqs[c] = None
|
||||
cluster_max_freqs[c] = None
|
||||
for i, c in enumerate(device.core_clusters):
|
||||
self.max_freq_list.append(cluster_max_freqs[c])
|
||||
entry = 'CPU {} FREQUENCY: {} kHZ'.format(i, cluster_freqs[c])
|
||||
|
Reference in New Issue
Block a user