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

46 Commits

Author SHA1 Message Date
Marc Bonnici
d9a7e1c475 utils/types: Add add method to toggle_set
Allows adding of elements that will respect the state of an existing
element in the toggle set.
2018-02-01 14:26:08 +00:00
Marc Bonnici
e5ed64d8d5 trace_cmd: Rename trace-cmd to trace_cmd
Both the instrument and utility functions were called `trace-cmd.py`.
`"-"`'s are not valid python identifiers therefore when trying to import
the `trace-cmd` module this causes an error.
2018-01-25 16:28:51 +00:00
Marc Bonnici
f26d819aad utils/exec_control: Fix once decorator implementation
Ensures that the once decorator does not affect classes in a parallel
inheritance hierarchy.
2018-01-15 15:42:26 +00:00
Marc Bonnici
950427f478 utils/revent: Refactor ReventRecording to avoid duplicate target calls
Changed location of revent binary on target to be a class attribute so that
it is shared across all instances. Also changed discovery method to a
static method which can be memoized to prevent the target being queried
unnecessarily.
2018-01-08 10:36:02 +00:00
Marc Bonnici
9832db9fa5 utils/doc: Rename get_rst_from_extension for consistency 2017-12-14 09:50:26 +00:00
Marc Bonnici
adb14442c8 utils/doc: Change get_params_rst to be more flexible
Instead of taking an extension as a parameter and assuming there it has
an attribute 'parameters' instead take a list of parameters directly
which allows the method to be used with parameter lists with different
names.
2017-12-14 09:50:26 +00:00
Brendan Jackman
aa2abd16a3 Run autoflake to remove unused imports & variables 2017-12-07 15:37:49 +00:00
Marc Bonnici
bc5b43df30 Utils/Android: Fix missing space in check
Logcat entries are split on a ':' followed by a space so ensure this
is present in the line instead of just a ':'. Some devices have entires
without the trailing space causing an error.
2017-11-24 16:38:01 +00:00
Sergei Trofimov
39e63f1358 utils/android: add a parser for Logcat
Add a simple streaming parser for Logcat logs. At the moment, only the
recent logcat format is supported.
2017-11-24 14:30:09 +00:00
Sergei Trofimov
2ff1a87e53 utils/types: fix toggle_set docstring
The docstring claimed that the toggle_set was "A list that...".
2017-11-03 17:33:32 +00:00
Brendan Jackman
4b7d43de9e utils/log: Convert exception to string before passing to Logger
Now that we add an event when logging errors, we need to avoid passing an
exception object directly to the logger. Otherwise we end up adding the
unserializable Exception object to the events list, which causes an error when
trying to write the output.
2017-10-23 17:25:15 +01:00
Brendan Jackman
b11bd6cf12 utils/log: Whitespace 2017-10-23 17:25:02 +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
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
109490ec3e utils/types: make list_of classes serializable 2017-10-06 12:55:25 +01:00
Sergei Trofimov
7b1cc6fa4e utils/serializer: add OrderedDict to POD_TYPES
Allow OrderedDict to be serialized in the same way as regular dicts by
defining it as a Plain Old Data type.
2017-09-28 10:46:03 +01:00
Sergei Trofimov
0c40cdae18 tools/revent: improve recording + add prebuilts
The begining and end of recording timestamps are now stored as part of
the recording. This allows to correctly replay recordings where the
first event occurs some time after the recording started, or the last
event some time before recording ended.

Add pre-built revent binaries for the armeabi and arm64 architectures.
2017-09-27 10:34:00 +01:00
Sergei Trofimov
9b6d4d9fa6 utils/revent: stop recording fix.
It seems that occasionally an inclomplete recording file is pulled. Add
a one-second (target time) delay to allow SIGINT to be properly handled
and recording to be updated, followed by a sync to ensure the file has
been written.
2017-09-27 10:32:19 +01:00
Sergei Trofimov
c29b1c8b23 utils/log: log_error marks Exception as logged.
Mark the Exception is logged inside log_error, to prevent it form being
logged repeatedly if re-raised.
2017-09-27 10:32:19 +01:00
Marc Bonnici
c5b1caa276 Utils/Enum: Adds a __str__ method to display enum levels 2017-08-16 17:35:19 +01:00
Marc Bonnici
2cc60b77cb Utils/Serializer: Adds serializer support for level type 2017-08-16 11:10:46 +01:00
Sergei Trofimov
3f87f3ab07 utils/misc: remove enum_metaclass
It is unused and has been obsoleted by enum type in utils/types.
2017-08-09 15:59:20 +01:00
Sergei Trofimov
a9959550af utils/types: better enum class member setting
- What used to be enum.values is now enum.levels.
- Add enum.names and enum.values that are lists of enum's levels' names
  and values respectively.
- Add a check on creation to make sure that provided level names do not
  conflict with the atomatically created members.
2017-08-09 15:59:20 +01:00
Sergei Trofimov
5e0ff6aa51 cpufreq: rename get_domain_cpus
get_domain_cpus() got renamed to get_related_cpus() in devlib to reflect
the cpufreq nomenclature. This commit makes corresponding changes in WA.
2017-07-26 14:58:46 +01:00
Marc Bonnici
91c49d9e95 ExecControl: Fixes bug with inheritance
Previously there was no differentiation between the same method at different
inheritance levels, therefore using the once_per_instance_decorator with super call would
prevent the super call from executing as they were considered the same
instance.
2017-07-10 11:08:43 +01:00
Marc Bonnici
85218a10d2 Types: Adds ParameterDict Type
Acts like a regular dictionary however will automatically url
encode/decode the data along with relevant type information.
2017-07-10 11:08:43 +01:00
Sergei Trofimov
5b3d7af62e types: make enum levels serializable
Add to/from_pod implementations to level, so that it may be serialized
properly. In order to make sure that serialization is a reversible
operation, ensure that the level value is numeric.
2017-06-26 09:13:30 +01:00
Sergei Trofimov
f0d5ff2309 utils/trace_cmd: add parsers for more sched events
Added parsers for sched_wakeup(_new) and sched_stat_* events
that have non-standard text.
2017-05-31 10:47:50 +01:00
Sergei Trofimov
8e3ae321a2 trace-cmd: Add parser for text trace.
This re-adds the parser for the trace-cmd text trace, after it got
dropped along with wlauto sub-tree. There are minor differences from the
old WA2 parser.

- Changed to work with devlib start/stop markers
- TraceCmdTrace renamed to TraceCmdParser
- The file path is now passed to the parse() method rather than
  on creation.
- detect whether markers are present in the trace and do not filter
  if they aren't
2017-05-25 11:32:42 +01:00
Sergei Trofimov
1b2373f5a5 Fix utils tests
- added missing import to types
- removed tests for TreeNode (no longer exists)
2017-04-27 09:01:20 +01:00
Marc Bonnici
adaa83b6eb ReventUtils: Added ReventRecorder
Added `ReventRecorder` which is used to deal with the revent binary
on the device including deloyment, running commands and cleaning up
again.
2017-04-21 10:49:20 +01:00
Marc Bonnici
2406d01672 Exec Control: Copied to WA3 and now uses default environment.
Moved execution decorators from wlauto to wa.
Modified to use a default environment if none is explicitly specified.
2017-04-20 14:27:25 +01:00
Marc Bonnici
e60e31ff8e Imports: Updated Imports
Switch remaining wlauto imports to wa.
Added other missing imports.
2017-04-20 11:49:53 +01:00
Sergei Trofimov
bddabbc56d revent workload part 1 2017-04-06 16:38:39 +01:00
Marc Bonnici
11323b6256 TM: Update and Refactor
TM has been updated and restructured to be clearer, including splitting off
assistant and creating a runtime parameter manager into their own files.
2017-04-05 11:51:29 +01:00
Marc Bonnici
519389859e Misc Utils: Fixed 'merge_dicts_simple'
Previously this function was ignoring the `other` parameter
and therefore not actually merging the two dictionaries.
2017-03-31 17:42:33 +01:00
Sergei Trofimov
ebf917a8a9 Added filer, http and user directory resource getters. 2017-03-22 15:16:37 +00:00
Sergei Trofimov
15886ffa29 Streamline resource resolution mechanics. 2017-03-22 15:16:37 +00:00
Sergei Trofimov
c5cd2b9298 Initial priority implementation
- Fixed up some of the signal map for instrumentation
- Changed how priorites are specified -- no longer method name prefixes
  but dedicated decorators, including an easy way of specifying a custom
  priority level (no longer need to manually connect signals)
- Updated ExecutionTimeInstrument to work with the new system
- Also removed some dead code
2017-03-17 16:21:14 +00:00
Sergei Trofimov
24402660c4 Initial implementation of state tracking and output handling. 2017-03-17 09:15:43 +00:00
Sergei Trofimov
ec109f5d0b fixing "params" handling in section entries
"params" is interpreted differently in section vs workload entires in
the agenda; previously, this was handled in the generic entry
construciton function by examining the ID prefix of the entry to
distinguish between the two.

This is unreliable as the user may specify their own IDs that won't have
the expected prefixes. To handle this, the "params" alias resolution for
sections is now handled in section specific part of entry processing
(workloads are handled autmatically because that is the default for
the corresponding JobConfig config point).
2017-03-15 14:34:31 +00:00
Sergei Trofimov
ccdc3492e7 Handle retry failed 2017-03-15 14:34:31 +00:00
Sergei Trofimov
011fd684bd Skeleton job execution 2017-03-15 14:34:23 +00:00
Sergei Trofimov
6eb5c3681d New target description + moving target stuff under "framework"
Changing the way target descriptions work from a static mapping to
something that is dynamically generated and is extensible via plugins.
Also moving core target implementation stuff under "framework".
2017-03-15 14:34:12 +00:00
Sergei Trofimov
42539bbe0d New target description + moving target stuff under "framework"
Changing the way target descriptions work from a static mapping to
something that is dynamically generated and is extensible via plugins.
Also moving core target implementation stuff under "framework".
2017-03-06 11:10:25 +00:00
Marc Bonnici
1f1f2b12c6 WA3 Exsisting Code 2017-02-21 15:02:28 +00:00