': ' is used as the delimiter for the different parts of of the event
line; unfortunately, it is also a valid character sequence to appear in
a task name.
This change attempts to perform the event line split correctly by
ensuring that the cpu id is present in the first part.
Make event preamble parsing more robust in cases there are multiple
instances of ' [' (e.g. as part of thread name) by splitting exactly
once from the right. The right-most columns are the timestamp and the
cpu id, and much more restricted (and therefore predictable) in their
formatting.
Add "no_idle" parameter to work around the problem where cores are
reported to be in "unknown" state if there are no cpuidle transitions in
the trace. If this parameter is set, cpustates will assume cores are
active without waiting for an idle transition.
This reverts commit 9bd745b347ef1a18a8b46a07cf5fa6dd3af642f8.
When a frequency is changed on a core, cpufreq reports a frequency
transition for all cores in the frequency domain. This means it is not
safe to assume a core is not idling just because there is a frequency
transition reported for it (that just means that there is at least one
core on that frequency domain that is not idling). Moreover, the
transitions are always reported in the same order so there is no way to
infer which core triggered it.
If a frequency transition is observed before an idle state can be
established, assume idle state is -1 (i.e. the core is running). This
will ensure correct stats for platforms with disabled cpuidle.
This back-ports ssh_get_shell implementation from devlib. It includes
the following changes:
- original_prompt for Telnet verison of the connection can now be passed
as an argument.
- Multiple attempts to connect with a timeout.
- Some additional implementation to the tty, including setting the size.
This commit resolves a couple of issues that were causing impropper
cluster shutdown tracking in the cpustates script.
- requested_states in the PowerStateProcessor was being initalized to -1
instead of None if no state was requested; the later checks are
against None.
- requested_states was not being set if the request could be satisfied
immediately, and was being cleared upon being statisfied at a later
time. This caused a problem when a core leaves idle and then tries to
re-enter cluster shutdown. Here is an example sequence of events that
illustrates the issue (assume core0 and core1 are the only two cores
on a cluster):
1. both cores are running
2. core0 requests cluster-sleep. As core1 is running, it
is put into core-sleep instead, and its request is saved.
3. core1 requests cluster-sleep. As core0 has a pending request
for cluster-sleep, both cores are put into cluster-sleep and
the pending request is cleared.
4. core1 becomes active. core0 is elevated to core-sleep.
5. core1 tries to enter cluster-sleep. Since core0 is currently
in core-sleep (and its prior request has laredy been
cleared), core1 is put into core-sleep instead, and its
request is saved. This is an ERROR as but cores have in fact
requested cluster-sleep at this stage.
If, in step 4., core0 becomes active instead, exactly the same
situation will result, as core1 was put into cluster-sleep immediately
and its request was never saved.
Idle state requests are now always tracked on entry and are only
cleared when the core leave idle.
- Also removed a pointless identy assignment.
Added an option to generate a timeline of state transitions, in
contrast to the existing timeline of computed states. This is primarily
intended for debugging of the latter, but may also be useful for certain
kinds of analyses.
A new 'ParameterDict' has been added that automatically encodes and
decodes values when they are store in a dictionary. The dictionary uses 2 characters
prefixed to each value to store the original type information, e.g. 'fl' -> list of
floats, before being passed through a url encoder. The reverse process happens on retrieval.
To access the encoded values an `iterEncodedItems` and `getEncodedValue` methods have been added.
The appropriate unit tests have also been added.
UxperfParser class is moved from the UxperfResultProcessor class into a new
python module in utils. This will help to use the UxperfParser even when
the result procesor is not configured.
Fixed new gamemode not being set for compatibility mode.
Fixed input buffer not being flushed causing replay to fail.
Fixed infinte loop if revent recording did not end correctly.
Updated revent binaries.
When collecting ftrace events, the instrument will insert frequencies
into the trace to make it possible reconstruct power states when there
were no frequency transitions during the measured period.
The format in which frequencies are inserted is different in devlib.
Since post-processing scripts may be run on traces collected by devlib
as well as WA, it needs to support both formats.
- Corrected the depency for opencv bindings. Even though the library is
imported as "cv2", the package containing it is called
"opencv-python".
- pylint: ignore no-member warnings; cv2 pulls it's memebers dynamically
from the underlying libopencv, so pylint can't see them.
Due to inaccuracies in revent playback, the resultant state does not
always match the templates precisely causing state detection to fail.
To help this images are now scaled to different sizes before being
matched to the templates to compensate for slight variations in size.
When using 'check_exit_code' and 'as_root' options for adb_shell with
a command containing single quotes, the provided command was escaped
twice which has now been avoided.
- Updated the revent parser to handle the new revent format.
- Updated the revent parser to expose device info and recording
metatdata.
- The parser can now be used in streaming and non-streaming mode (stream
events from the file as they are being accessed, or read them all in
at once).
- -g option added to "record" command to expose the gamepad recording
mode.
- Corrected code highlighting and phase names in documentation
- Fixed check_states paremeter not being honoured
- Moved state dependencies check to happen earlier in execution
and to be a user facing error
It looks like on recent systems, adb has started to correctly forward
stderr from the target device to stderr on the host (wereas in the past,
it got output to stdout on the host). This commit makes sure that
stderr gets correctly forwarded to the coller in cases where return code
checking was not enabled.
When running the stand-alone cpustates script and specifying a timeline
file (which causes the corresponding reporter to be enabled), a
timeline report is generated in addition to the usual cpustates and
parallelism reports.
Up to this point, the main() of the stand-alone script was expecting
exactly two reports and so it crashing when running with the timeline
option. This commit fixes this case.
CalledProcessErrorWithStderr is a subclass of CalledProcessError that
also takes stderr output. Both that and normal output must be passed as
keyword arguments. They were being passed as keyword arguments inside
_scp() of SshConnection, causing cryptic errors to appear.
Additionally, "output" was not being properly poped off before invoking
super's init.
Add method to automatically check against a dictionary of known package
versions that don't work well with AndroidUiAutoBenchmark workloads.
Raises an exception if found.
- Added statedetect.py in utils which is a standalone module that
contains all the methods needed for state detection
- Modified the setup() and run() methods of the GameWorkload class
in common/android/workload.py to have a parameter that enables
state checks and run the check after setup and run if requested.
State detection uses the template matching method available in
OpenCV to determine the state of the workload by detecting
predefined unique elements on a screenshot from the device.
Processing logic for frame statistics can be moved out of fps instrument
to a new utility file. This will allow result processors to use the same
logic to produce frame statistics on a subsection of the data
produced by the fps instrument.