The current implementation of match() in the gem5stats module returns
records matching exactly the specified keys. This commit changes this
behaviour by matching keys over regular expressions, hence resulting in
a much more powerful match() implementation.
Adds `DerivedMeasurements` which are designed to perform post processing on
a provided MeasurementCsv.
Currently only a `DerivedEnergyMeasurements` class has been added which
has 2 purposes:
- Calculate energy from power results if not present using recorded timestamps,
falling back to a provided sample rate
- Calculate cumulative energy and average power from a specified MeasurementCSV
file.
To conform with the new DerivedMeasuements API the "sim_seconds" channel
has been renamed to "timestamp" so that it can be identified in post
processing. As "sim_seconds" needs to be extracted from the gem5
statistics file, an addional mapping has been added to support this.
numeric() conversion function is expanded to handle percentage values in
the form "10.123%". The result is the numeric part converted to a float
and divided by 100, e.g. 0.10123.
Currently, reset_origin() in the gem5stats module enables to virtually
truncate the existing dumps from the gem5 statistics file so that any
subsequent match() calls will apply only on new dumps. However, the
current implementation resets the origin of the stats file unilaterally,
without other clients knowing about it, hence leading to data being
lost.
This commits removes the reset_origin() method and provides a different
API to handle virtual truncatures in the stats file. Namely, the match()
method now takes a base_dump parameter letting clients specifiying from
which dump they want match() to apply. This feature could also be usefull
if someone wanted to add off-line processing features for statistics
files.
Instead of using a default 'horizontal' unlocking method, now will try
a diagonal swipe up as this should work most modern devices with vertical or
horizontal unlocking methods.
In order to change the state of airplane mode, the setting needs to
be configured before broadcasting an intent to update the system. As of
Android N, root is required to send the broadcast, therefore this method
will raise an error if the requirements are not satisfied.
- Use related_cpus rather than affected_cpus inside get_domain_cpus to
return all cpus in the domain (including those online). This changes
the behavior, but old behavior was almost certainly wrong as the
method is memoized, and so the result should not be affected by
hotplug.
- Add a non-memoized get_affected_cpus() which implements the old
behavior.
Calling thermal.disable_all_zones() would raise an exception.
I've changed a few things:
* use self.zones.itervalues() in disable_all_zones to fix that exception
* renamed zone.set_mode() to zone.set_enabled()