1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 19:01:15 +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:
setrofim 2016-11-30 09:38:05 +00:00 committed by GitHub
commit 4e161127e1
2 changed files with 7 additions and 2 deletions

View File

@ -745,7 +745,8 @@ class EnergyModelInstrument(Instrument):
spec.runtime_parameters['{}_frequency'.format(core)] = freq
if not self.no_hotplug:
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.label = 'freq_{}_{}'.format(cluster, spec.label)
spec.workload_parameters['taskset_mask'] = list_to_mask(self.get_cpus(cluster))

View File

@ -32,6 +32,7 @@ logger = logging.getLogger('power')
UNKNOWN_FREQUENCY = -1
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):
@ -311,7 +312,10 @@ def stream_cpu_power_transitions(events):
elif TRACE_MARKER_STOP in event.text:
yield TraceMarkerEvent('STOP')
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:
yield CorePowerTransitionEvent(event.timestamp,
int(match.group('cpu')),