mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 11:22:41 +01:00
Merge pull request #300 from setrofim/master
A couple of fixes for trace CPU power state post-processing and energy model scripts
This commit is contained in:
@@ -745,7 +745,8 @@ class EnergyModelInstrument(Instrument):
|
|||||||
spec.runtime_parameters['{}_frequency'.format(core)] = freq
|
spec.runtime_parameters['{}_frequency'.format(core)] = freq
|
||||||
if not self.no_hotplug:
|
if not self.no_hotplug:
|
||||||
spec.runtime_parameters['{}_cores'.format(core)] = num_cpus
|
spec.runtime_parameters['{}_cores'.format(core)] = num_cpus
|
||||||
spec.runtime_parameters['ui'] = 'off'
|
if self.device.platform == 'chromeos':
|
||||||
|
spec.runtime_parameters['ui'] = 'off'
|
||||||
spec.id = '{}_{}_{}'.format(cluster, num_cpus, freq)
|
spec.id = '{}_{}_{}'.format(cluster, num_cpus, freq)
|
||||||
spec.label = 'freq_{}_{}'.format(cluster, spec.label)
|
spec.label = 'freq_{}_{}'.format(cluster, spec.label)
|
||||||
spec.workload_parameters['taskset_mask'] = list_to_mask(self.get_cpus(cluster))
|
spec.workload_parameters['taskset_mask'] = list_to_mask(self.get_cpus(cluster))
|
||||||
|
@@ -32,6 +32,7 @@ logger = logging.getLogger('power')
|
|||||||
UNKNOWN_FREQUENCY = -1
|
UNKNOWN_FREQUENCY = -1
|
||||||
|
|
||||||
INIT_CPU_FREQ_REGEX = re.compile(r'CPU (?P<cpu>\d+) FREQUENCY: (?P<freq>\d+) kHZ')
|
INIT_CPU_FREQ_REGEX = re.compile(r'CPU (?P<cpu>\d+) FREQUENCY: (?P<freq>\d+) kHZ')
|
||||||
|
DEVLIB_CPU_FREQ_REGEX = re.compile(r'cpu_frequency(?:_devlib):\s+state=(?P<freq>\d+)\s+cpu_id=(?P<cpu>\d+)')
|
||||||
|
|
||||||
|
|
||||||
class CorePowerTransitionEvent(object):
|
class CorePowerTransitionEvent(object):
|
||||||
@@ -311,7 +312,10 @@ def stream_cpu_power_transitions(events):
|
|||||||
elif TRACE_MARKER_STOP in event.text:
|
elif TRACE_MARKER_STOP in event.text:
|
||||||
yield TraceMarkerEvent('STOP')
|
yield TraceMarkerEvent('STOP')
|
||||||
else:
|
else:
|
||||||
match = INIT_CPU_FREQ_REGEX.search(event.text)
|
if 'cpu_frequency' in event.text:
|
||||||
|
match = DEVLIB_CPU_FREQ_REGEX.search(event.text)
|
||||||
|
else:
|
||||||
|
match = INIT_CPU_FREQ_REGEX.search(event.text)
|
||||||
if match:
|
if match:
|
||||||
yield CorePowerTransitionEvent(event.timestamp,
|
yield CorePowerTransitionEvent(event.timestamp,
|
||||||
int(match.group('cpu')),
|
int(match.group('cpu')),
|
||||||
|
Reference in New Issue
Block a user