mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 10:11:17 +00: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:
commit
4e161127e1
@ -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))
|
||||
|
@ -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')),
|
||||
|
Loading…
x
Reference in New Issue
Block a user