1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 19:01:15 +01:00
Commit Graph

894 Commits

Author SHA1 Message Date
Brendan Jackman
9fa1b133dc framework: Add bail_on_init_failure run configuration
This maintains the default behaviour of bailing out immediately if any workload
fails in initialize(), but adds a setting, bail_on_init_failure, to change this
behaviour optionally. This can be useful where WA is being used more as a batch
processor.
2017-10-23 16:44:49 +01:00
Brendan Jackman
4a001713bb framework/execution: Factor out skip_job method
This also fixes the missing housekeeping when skipping a job due to phones_home
2017-10-23 16:44:49 +01:00
setrofim
ccaeb5a142 Merge pull request #524 from setrofim/logger-events
Logger events
2017-10-23 14:27:36 +01:00
Sergei Trofimov
8dd1e6636c framework: set context for loggers
Set context for the loggers of the Runner, the workloads and the
installed instruments and processors. Errors/warnings logged by these
entities will be automatically added as events.
2017-10-23 12:28:49 +01:00
Sergei Trofimov
47d883de09 utils/log: add ContextLogger
Add ContextLogger wich extends logging.Logger's  warning and error
methods to automatically add the message to the context's events (if a
context has been provided).
2017-10-23 12:28:29 +01:00
setrofim
551b47a958 Merge pull request #522 from bjackman/job-log-iteration
framework/job: Include job iteration in log messages
2017-10-19 16:32:18 +01:00
Brendan Jackman
138ed1495e framework/job: Include job iteration in log messages 2017-10-19 16:28:43 +01:00
setrofim
42b1486559 Merge pull request #517 from bjackman/monsoon
instrumentation: Add support for Devlib's monsoon instrument
2017-10-18 08:21:25 +01:00
Chris Redpath
85c39cd48e instrumentation: Add support for Devlib's monsoon instrument
The parameter support is untested as the defaults match what my system
does.

Signed-off-by: Chris Redpath <chris.redpath@arm.com>
2017-10-17 12:16:52 +01:00
setrofim
73f863f281 Merge pull request #515 from bjackman/hwmon
hwmon: Add hwmon instrument
2017-10-13 14:44:16 +01:00
Brendan Jackman
a719f3b156 hwmon: Add hwmon instrument
For some reason I didn't look at the WA2 instrument until afer I
wrote this, so it's different in how it handles 'before/after'
quantities (which I called 'momentary' in the code) - instead of
adding a 'mean' it just adds two separate metrics: one for before and
one for after. Personally I think this is more useful (esp. for
temperature) but if necessary I can revert to the old behaviour.

This also doesn't add the helpful classifier telling you the hwmon
device, because we don't have immediate access to that info from the
devlib Instrument. If necessary I'm sure it could be added later.

Furthermore it doesn't have a parameter to filter the sensors, just
collects from them all.
2017-10-12 18:16:23 +01:00
setrofim
9e8c0cfb32 Merge pull request #516 from bjackman/trace-cmd-very-slow
trace-cmd: Add missing very_slow decorator to stop method
2017-10-12 18:00:50 +01:00
Brendan Jackman
a5badad8e9 trace-cmd: Add missing very_slow decorator to stop method 2017-10-12 17:58:45 +01:00
setrofim
311d122ad7 Merge pull request #512 from bjackman/port-dmesg
WA3 dmesg instrument
2017-10-11 15:45:38 +01:00
Brendan Jackman
f6fa6ba793 instrumentation: Port dmesg instrument from WA2 2017-10-11 15:43:40 +01:00
setrofim
d7a6a3c82a Merge pull request #509 from setrofim/next
Fixes
2017-10-11 15:31:34 +01:00
setrofim
ea3f9307d9 Merge pull request #514 from bjackman/next
Fixup standard energy channels fix
2017-10-11 15:31:00 +01:00
Brendan Jackman
04181e5859 energy_measurement: Fixup standard metrics fix
Typo'd this and seems I failed to test it
2017-10-11 15:26:04 +01:00
setrofim
4eda719130 Merge pull request #511 from bjackman/energy-measurement-standard-metrics
energy_measurement: Ensure 'standard' energy metrics are produced
2017-10-10 15:40:00 +01:00
Brendan Jackman
cd54cb7baf energy_measurement: Ensure 'standard' energy metrics are produced
Where backends have the capability to collect from multiple devlib
Instruments, EnergyMeasurement currently appends 'device' keys to the
names of metrics reported by those Instruments. Where multiple
Instruments are indeed used, it then sums up equivalent metrics to
produce the 'normal' metric without the 'device' keys
appended.

E.g. If you have two ACME 'devices' enabled you will get something
like
'device_total_energy_iio:device0' and
'device_total_energy_iio:device1', which will be summed to produce
'device_total_energy'.

However when only one Instrument is actually instantiated, this is
not needed and not done. Therefore just directly produce the metric
with the name originally given by devlib (i.e. in the example,
'device_total_energy').
2017-10-10 15:25:38 +01:00
Sergei Trofimov
1daec4f2c5 framework/getters: fix http getter APK resolution
Fully matching an APK resource requires the file to be present locally,
so that its metadata can be queries. HTTP getter was matching against a
remote path so the match was failing.

The matching now happens in two stages == first partial path-only
matches are established. Secondly, all partial matches are downloaded
and final match occurs against downloaded files.
2017-10-10 13:14:07 +01:00
Sergei Trofimov
5f7c64b089 framework/resource: add match_path method
This method is used to partially match a resource; its implementation
cannot rely on the resource file actually being present and must match
against the specified path alone.

match() implementation now defaults to match_path(), as for most
resource types, the path is sufficient to uniquely match a resource.
2017-10-10 11:39:53 +01:00
Sergei Trofimov
a6cb9eb6a4 instrument/energy: Fix backend parameter passing
- Convert parameter keys to identifiers before applying
- Raise an error if passed a param invalid for a backend.
2017-10-10 09:51:13 +01:00
setrofim
c3438b6814 Merge pull request #500 from setrofim/next
memcopy workload + fix gem5 support.
2017-10-10 08:58:24 +01:00
setrofim
590309b6be Merge pull request #508 from bjackman/instrumentation-typo
instrumentation: Fix typo
2017-10-10 08:40:25 +01:00
setrofim
bfa7e81996 Merge pull request #507 from bjackman/energy-measurement-check
energy_measurement: Check for failure of Instrument::get_data
2017-10-10 08:40:10 +01:00
setrofim
23b52a4b8e Merge pull request #506 from bjackman/next
PluginCache: Improve error message for ill-formed plugin config
2017-10-10 08:39:23 +01:00
Brendan Jackman
049e2df0dc instrumentation: Fix typo 2017-10-09 18:26:41 +01:00
Brendan Jackman
b4a608da95 energy_measurement: Check for failure of Instrument::get_data
Devlib's get_data API can return None when something goes wrong -
this currently results in us attempting to add a non-existent
artifact.

To avoid this confusion, check and use the return value from
get_data, instead of assuming that it will write data to its
'outfile' parameter.
2017-10-09 16:17:02 +01:00
Brendan Jackman
016d68bfa0 PluginCache: Improve error message for ill-formed plugin config
Currently if you get confused and write a config with something like:

energy_measurement:
  acme_cape

Then you get an error when we try to 'iteritems' on the value
'acme_cape'. Instead, explicitly check for this case.
2017-10-06 18:00:38 +01:00
Sergei Trofimov
287ab8d565 instrumentation/misc: fix sysfile_getter/cpufreq
- Fix start/stop methods of sysfile_getter, which where still using the
  WA2 mechanic of prefixing "slow_" to the name to indicate priority,
  and consequently weren't being invoked.
- Call super inside cpufreq's valide(() to make sure tempfs path is set.
2017-10-06 15:04:02 +01:00
Sergei Trofimov
5ecc4703e4 framework/execution: fix TargetManager termination
- Make sure TargetManager.finalize() actually gets called at the end
  of the run.
- Overrule the "diconnect" parameter behavior for gem5 and make sure it
  always disconnects. This necessary for stats to be generated properly.
2017-10-06 15:04:02 +01:00
Sergei Trofimov
05e90bd623 instrumentation/misc: fix interrupts instrument
When porting from WA2 interrupt instrument retained references to
"device" instead of "target".
2017-10-06 15:04:02 +01:00
Sergei Trofimov
0d54c5f070 workloads: add memcpy workload
Ported memcpy workload from WA2.
2017-10-06 15:04:02 +01:00
Sergei Trofimov
c93b1a0939 utils/log: adjust level for CGgroups logger
devlib's CGgroups module logs things at INFO level. The information it
logs is too detailed for what WA considers "INFO", and should be logged
at DEBUG level instead.
2017-10-06 15:04:02 +01:00
Sergei Trofimov
c89e249732 framework/target: add ability to pass additional platform params.
Gem5Platform requires a host output directory as one if it's
instantiation parameters. This is not something we want to expose a
configuration parameter to the user, as for WA, the standard output
directory ought to be used.

Up to this point, WA's target instatiation process assumed that all
parameters came from the user, and there was no way for WA itself to set
them. This commit adds extra_platform_parms argument to
instantiate_target, to remedi this.

extra_platform_parms is then used to set the host output directory for
gem5 appropriately.
2017-10-06 15:04:02 +01:00
Sergei Trofimov
55a72002ca framework/target: fix gem5 target descriptor
(linux|android)_gem5 devices were being described as having gem5
platforms but standard linux/android connections. This commit fixes this
by making sure that the gem5 connection is used.
2017-10-06 15:04:02 +01:00
setrofim
12edabf753 Merge pull request #501 from bjackman/acme-multiple-instruments2
energy_measurement: Allow multiple IIO devices for ACME
2017-10-06 15:01:31 +01:00
setrofim
ae1363d573 Merge pull request #505 from bjackman/geekbench-fixes
geekbench: Fix use of WA3 APIs
2017-10-06 14:55:37 +01:00
setrofim
ad08cbfe37 Merge pull request #504 from setrofim/energy-backend-param-fix
framework/target: fix runtime param name resolution
2017-10-06 14:54:39 +01:00
Brendan Jackman
6d6fc25e40 geekbench: Fix use of WA3 APIs
Seem I cherry-picked the geekbench workload from my WIP branch
without testing properly, and missed a fixup commit. Here's the
content of that commit, which fixes some missing updates from WA2 ->
WA3 APIs.
2017-10-06 14:51:50 +01:00
Brendan Jackman
e672ea3faf energy_measurement: Allow multiple IIO devices for ACME
Devlib's ACME instrument uses iio-capture under the hood, which can
only capture data from one IIO device at a time. Devlib's instrument
API expects to produce a single CSV file for the Instrument, with a
single axis of sample timestamps. These two things cannot be
correctly reconciled without changing the devlib Instrument API -
get_data would need to be able to return two distinct sets of data.

Instead, where required WA will instantiate the ACME instrument
multiple times (once for each IIO device), producing two separate CSV
files. Aggregated energy info (as opposed to timestamped samples of
energy data) _can_ be meaningfully combined from multiple IIO
devices, so the derived stats are summed.

This requires altering the internal API of the energy_measurement
module - rather than a single instrument the super-instrument now has
a dictionary mapping 'device' keys (this is really an arbitrary key,
but I think that 'device' is a justifiable metaphor for whatever
might separate multiple instruments, plus it is the terminology used
by IIO/ACME) to Instrument objects.  Existing instruments simply
return a dict with a single entry, with None as the key.

It may in future be possible to solve this problem in devlib's ACME
instrument by avoiding the use of the iio-capture tool. In that case,
it should be possible to basically revert this patch and get the
required funcitonality from devlib.
2017-10-06 14:43:54 +01:00
Sergei Trofimov
bce66f4388 framework/target: fix runtime param name resolution
Runtime param names from config were matched against names available on
for the target using an overly-loose regex that resulted in the wrong
config point being returned.

Use caseless_string matching instead.
2017-10-06 14:21:23 +01:00
setrofim
1fe3ed9f96 Merge pull request #503 from setrofim/energy-backend-param-fix
energy instrument backends parameter validation fix
2017-10-06 13:56:46 +01:00
Sergei Trofimov
ce3064dd6f instrument/energy: correct backend param init
As paramters defined by energy_measurement instrument backends were not
used in instantiating the backends, but the underlying devlib
instrument, the values did not undergo the usual Plugin parameter
setting perocedure. In particuar, type conversion would not take place.

Make sure backend parameters are validated properly by setting them on
an obj_dict before passing them  to the devlib instrument.
2017-10-06 13:55:16 +01:00
Sergei Trofimov
109490ec3e utils/types: make list_of classes serializable 2017-10-06 12:55:25 +01:00
Sergei Trofimov
7d9b6d6dd7 framework/config: ensure correct type for param defaults
Call self.kind() on the default value of a parameter before assigning it
to make sure that the assigned value is of correct type.
2017-10-06 12:52:57 +01:00
Sergei Trofimov
6e0cb73a4e framework/config: make LoggingConfig serializable 2017-10-06 12:52:12 +01:00
setrofim
cd328c9a50 Merge pull request #502 from bjackman/youtube-playback
youtube_playback: Add youtube_playback workload
2017-10-06 10:33:32 +01:00
Brendan Jackman
b18db64be1 youtube_playback: Add youtube_playback workload
This is a very simple workload that just aims to allow collecting
instrumentation data on purely the video decoding aspect of Youtube.
2017-10-06 10:31:41 +01:00