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

376 Commits

Author SHA1 Message Date
setrofim
7145b366ab Merge pull request #133 from valschneider/fix-activity-error
utils/android: Fix error detection in adb_shell()
2017-06-13 08:57:56 +01:00
Valentin Schneider
2d96840873 utils/android: Fix error detection in adb_shell()
If we execute a command such as:
'am start -a android.intent.action.VIEW -d nothing'
on Hikey960 with AOSP master, we do get an error message:
'Error: Activity not started, unable to resolve Intent ...'
but the error code is set to 0. Furthermore, that error message
is outputted to STDERR and not STDOUT.

The current error checking in adb_shell() is done by either
reading the error code or finding an error string in the
standard output. This commit adds a check of the error output,
and also changes the regular expression that is used to find
an error string as it wasn't generic enough.
2017-06-12 19:08:10 +01:00
marcbonnici
48d717b301 Merge pull request #132 from setrofim/fps
Fps
2017-06-07 11:59:32 +01:00
Sergei Trofimov
1d3b4c8062 instrument/frames: Add surfaceflinger frames instrument
Add an instrument that utilizes the SurfaceFringerFrameCollector.
2017-06-07 11:53:57 +01:00
Sergei Trofimov
2b3cee6a7e rendering: Add surfaceflinger frame collector
Add a FrameCollector implementation that utilizes the output from
surfaceflinger (the Android compositor). This is is the only method for
accessing rendering data on older Android devices.
2017-06-07 11:53:57 +01:00
Sergei Trofimov
4adefecb55 instrument/frames: Add GfxInfoFramesInstrument
Added an instrument that exposes the GfxinfoFramesCollector via the
standard instrument APIs.
2017-06-07 11:53:57 +01:00
Sergei Trofimov
195085e28d rendering: Add gfxinfo frame data collector
Add display rendering frame collector that utilizes gfxinfo utility
present on newer Android devices.
2017-06-07 11:53:52 +01:00
Sergei Trofimov
59f36fc768 instrument: Add channel discovery to MeasurementCsv
- Add "unknown" measurement type to be used when the type of measurement
  for a CSV column cannot be established.
- Make channels argument optional for MeasurementCsv.
- If channels for a MeasurementCsv have not been specified, attempt to
  discover them from the CSV header. This will  check if each entry in
  the header ends with the name of a known MeasurementType prefixed with
  a "_"; if so, it will assume the reset of the entry is the site.
  Otherwise, the entire entry will be assumed to be the site and
  "unknown" MeasurementType will be used.
2017-06-07 11:53:06 +01:00
Sergei Trofimov
871c59a3f4 instrument: Add MeasurementType for time_us
Add time_us MeasurementType for time expressed in microseconds and
define conversions to/form time. This is a very common unit for low-level
operations, and it may be desirable to avoid converting large number of
metrics to floats in order to report as a "standard" type.
2017-06-07 11:53:06 +01:00
Sergei Trofimov
df81742100 instrument: add conversion support to MeasurementType
- Change MeasurementType to derive from object rather than tuple.
- There is now support for conversion from one MeasurementType to
  another. A MeasurementType defines what it can be converted to and
  how.
2017-06-07 11:53:06 +01:00
Sergei Trofimov
8296d6c5d6 exception: Add WorkerErrorException and get_traceback
- Add get_traceback -- a utility for getting the traceback for
  the current exception.
- Add WorkerErrorException that is used to capture and propagate
  exceptions from a  worker thread on the main thread.
2017-06-07 11:52:58 +01:00
setrofim
a900f94069 Merge pull request #131 from bjackman/cpufreq-error-message
cpufreq: Add possible error message for failing to set governor
2017-06-06 15:01:31 +01:00
Brendan Jackman
0cac92af27 cpufreq: Add possible error message for failing to set governor
I have observerd the error message "write error: Invalid argument"
when using set_all_governors to set a non-existent governor on a
buildroot Linux system
2017-06-06 14:56:57 +01:00
setrofim
2e106c9f70 Merge pull request #130 from Leo-Yan/fix_energy_probe_signal_2
energy_probe: send signal SIGINT to caiman
2017-06-05 13:24:19 +01:00
Leo Yan
a48775ec5a energy_probe: send signal SIGINT to caiman
ARM energy probe sends SIGTERM to caiman, this signal can be missed by
caiman due caiman has not registered signal handler for SIGTERM. On the
other hand, caiman registers signal handler for SIGINT, this patch is to
change to use signal SIGINT to notify caiman.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
2017-06-05 19:14:19 +08:00
setrofim
d92b18c102 Merge pull request #129 from ARM-software/revert-127-dry-run
Revert "target: add dry run for command execution"
2017-05-23 17:40:06 +01:00
setrofim
b738655050 Revert "target: add dry run for command execution" 2017-05-23 17:39:12 +01:00
setrofim
597231f3d5 Merge pull request #128 from ionela-voinescu/gem5_pull_multiple_files
gem5: modify pull method to support transfer of multiple files
2017-05-23 17:37:20 +01:00
Ionela Voinescu
cac70cba19 gem5: modify pull method to support transfer of multiple files
When providing a source file with wildcards (e.g. *ramp*.log)
to be pulled from the target, this might involve transferring
multiple files.
Add support for the transfer of multiple files in the pull method.

Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
2017-05-23 16:53:18 +01:00
setrofim
1198e42cdf Merge pull request #127 from valschneider/dry-run
target: add dry run for command execution
2017-05-23 10:40:18 +01:00
Valentin Schneider
e11573594a doc/target: Add dry-run documentation 2017-05-23 10:35:53 +01:00
Valentin Schneider
1a5c1dce07 target: Add dry run for command execution
It sometimes can be useful to enable dry-run before calling
high-level functions in order to check what individual commands
are being called (or do whatever else with them).

This patch adds dry-run with an on/off switch:
once start_dryrun() is called, every subsequent command passed to
execute() will be accumulated in a list.
stop_dryrun() disables dry-run, and the accumulated commands can
be fetched via Target.dryrun
2017-05-23 10:32:11 +01:00
Sergei Trofimov
1f7421bc39 setup.py: Add monsoon's dependencies to extras_require 2017-05-22 13:54:49 +01:00
setrofim
64292ad6b4 Merge pull request #126 from bjackman/fix-monsoon-instructions
monsoon: Fix name of gflags pip package in install instructions
2017-05-22 13:52:33 +01:00
Brendan Jackman
3dbd3f7fda monsoon: Fix name of gflags pip package in install instructions 2017-05-22 13:48:47 +01:00
setrofim
4a936da62f Merge pull request #125 from avanlaer/pull_directory
Pull directory
2017-05-18 08:16:44 +01:00
Anouk Van Laer
0b7ab6aa94 target: Added get_directory method
This new method allows to pull over a complete directory from the target.
It does so by compressing the directory, pulling over the
compressed file and extracting the directory on the host.
2017-05-17 17:39:00 +01:00
setrofim
4e0c03ebdd Merge pull request #124 from bjackman/cpufreq-iter-domains
Add iter_domains method to cpufreq module
2017-05-17 16:51:19 +01:00
Brendan Jackman
dc32fa9704 cpufreq: Add iter_domains method
It's common to want to do an operation on cpufreq that affects all
CPUs, but doing so explicitly for all CPUs can be unnecessarily slow
when it only needs to be done once for each cpufreq policy.

Add a method to abstract the pattern of iteration.
2017-05-17 16:37:27 +01:00
Anouk Van Laer
35987d5281 Gem5Connection: Correct pull method
The pull method used when connecting to gem5 uses the 'm5 writefile'.
This only works if the file to pulled in, is in the current working directory
on the target. The file therefore might need to be copied on the target, from its
original location to the working directory.
The previous implemention of this was incorrect and used information about the
current working directory on the host.
2017-05-17 15:49:20 +01:00
Sergei Trofimov
69a83d4128 target: add new methods
Added the following method to targets:

- sleep: sleep on target for the specified duration. In some situations,
         e.g. on simulation platforms, it is important that sleep
	 happens on the target rather than the host.

Added the following methods to Android targets:

- ensure_screen_is_off: complements the existing ensure_screen_is_on.
- homescreen: navigate to home screen.
2017-05-12 11:54:31 +01:00
Sergei Trofimov
8b2ac8d29d AndroidTarget: move _execute_util to internal methods. 2017-05-12 11:48:19 +01:00
Sergei Trofimov
97a89970d0 android: downgrading ls command log to debug
The format of an ls command is an implementation detail rather than
something of immediate interest to the user. Debug level is more
appropriate than info for this kind of message.
2017-05-12 10:45:42 +01:00
Sergei Trofimov
92d9e690f0 ftrace: add an option to report on target
trace-cmd is a Linux-specific executable that is not available on other
operating systems (even on other Unixes). The option to report on target
allows acquiring text trace even if the host is not running Linux.
2017-05-12 09:14:40 +01:00
Sergei Trofimov
61b13383a4 ftrace: chmod trace.dat to make world-readable
On some targets, umask is set such that the generated trace.dat is not
world-readable by default. This means it cannot be pulled from target.
2017-05-12 09:14:36 +01:00
Sergei Trofimov
7e80a381d8 ftrace: fix get_trace when outfile is directory
If the path passed into get_trace() is a directory, the collector is
supposed to use the name of the output file on target for the file on
the host. Until now however, os.path.dirname() was mistakenly called on
the target location (returning the containing directory rather than the
base name of the file).
2017-05-12 09:14:35 +01:00
setrofim
4dc54728c1 Merge pull request #122 from Sticklyman1936/propagate_check_error_code
Propagate check_error_code
2017-05-11 10:37:10 +01:00
Sascha Bischoff
f5906cb4ab Gem5Connection: Propagate the check_error_code flag
Previously, the flag was not propagated, so the error code was always
checked. With this change, we propage it to the _gem5_shell method.
2017-05-11 10:34:24 +01:00
setrofim
bb7591e8fa Version bump. 2017-05-04 17:39:53 +01:00
setrofim
783669371d Merge pull request #120 from bjackman/speed-up-ssh-execute
ssh: Combine exit code and main command
2017-05-04 16:59:22 +01:00
Brendan Jackman
0a20cec2d9 ssh: Combine exit code and main command
This avoids a network round trip and speeds up SSH targets.
2017-05-04 16:47:37 +01:00
setrofim
d72049d35b Merge pull request #119 from bjackman/monsoon
instrument: Add support for Monsoon Power Monitor
2017-05-04 13:09:57 +01:00
Brendan Jackman
3cfbad19bd instrument: Add support for Monsoon Power Monitor
This adds support for the Monsoon Power Monitor:

https://www.msoon.com/LabEquipment/PowerMonitor/

This device officialy supports only MS Windows so we use a tool from AOSP to
communicate with it from Unix targets:

https://android.googlesource.com/platform/cts/+/master/tools/utils/monsoon.py

The user is required to install this tool and its dependencies, then pass the
path to it as the monsoon_bin parameter.
2017-05-04 11:32:20 +01:00
setrofim
4522fe8d23 Merge pull request #117 from bjackman/adb-push-error
android: Raise better error when trying to push non-existent file
2017-05-02 08:43:24 +01:00
Brendan Jackman
e17b9c33d1 android: Raise better error when trying to push non-existent file 2017-04-28 11:32:23 +01:00
Sergei Trofimov
d968098717 Add build/ and dist/ to .gitingore
These directories contain artifacts generated by setuptools.
2017-04-26 17:19:55 +01:00
setrofim
b5ecf63638 Merge pull request #116 from bjackman/instrument-sample-rate
Add sample_rate_hz attribute to CONTINUOUS instruments
2017-04-26 16:22:33 +01:00
Brendan Jackman
0d61ee5951 daq: Rename sampling_rate->sample_rate_hz
For consistency with the new Instrument.sample_rate_hz attribute.
2017-04-26 16:19:07 +01:00
Brendan Jackman
fc81477cf8 doc/instrumentation: Fix whitespace 2017-04-26 16:00:54 +01:00
Brendan Jackman
49b547a7f6 instrument: Add sample_rate_hz attribute for CONTINUOUS instruments 2017-04-26 16:00:54 +01:00