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,6 +745,7 @@ 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
|
||||||
|
if self.device.platform == 'chromeos':
|
||||||
spec.runtime_parameters['ui'] = 'off'
|
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)
|
||||||
|
@@ -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):
|
||||||
@@ -310,6 +311,9 @@ def stream_cpu_power_transitions(events):
|
|||||||
yield TraceMarkerEvent('START')
|
yield TraceMarkerEvent('START')
|
||||||
elif TRACE_MARKER_STOP in event.text:
|
elif TRACE_MARKER_STOP in event.text:
|
||||||
yield TraceMarkerEvent('STOP')
|
yield TraceMarkerEvent('STOP')
|
||||||
|
else:
|
||||||
|
if 'cpu_frequency' in event.text:
|
||||||
|
match = DEVLIB_CPU_FREQ_REGEX.search(event.text)
|
||||||
else:
|
else:
|
||||||
match = INIT_CPU_FREQ_REGEX.search(event.text)
|
match = INIT_CPU_FREQ_REGEX.search(event.text)
|
||||||
if match:
|
if match:
|
||||||
|
Reference in New Issue
Block a user