1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 10:10:46 +00:00

648 Commits

Author SHA1 Message Date
Patrick Bellasi
0c7eb9e91e target: add support to kill/restart and ADB connection
Sometimes it could be useful to disconnect from the target, for example
when a "pass thought" energy monitor is used to control the USB
connection to the device.

This patch adds a couple of utility methods which allows to kill the ADB
server and restart it while waiting for the device to be ready to accept
new connections.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2017-07-12 12:30:30 +01:00
Patrick Bellasi
f26f942723 tagert: factor out the wait_boot_complete code
The connect() method embeds some code to wait for a target to be
completely booted.

Let's move this code into a dedicated function.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2017-07-12 12:27:28 +01:00
setrofim
b062097221 Merge pull request #145 from ionela-voinescu/fix_se
misc.py: fix syntax error introduced by 86c9b6a1c7e
2017-07-10 16:09:24 +01:00
Ionela Voinescu
0a95bbed87 misc.py: fix syntax error introduced by 86c9b6a1c7e
Signed-off-by: Ionela Voinescu <ionela.voinescu@arm.com>
2017-07-10 16:07:28 +01:00
marcbonnici
85f30ed4c7 Merge pull request #144 from setrofim/master
utils/misc: update MIDR table
2017-07-10 15:08:36 +01:00
Sergei Trofimov
86c9b6a1c7 utils/misc: update MIDR table
Update the MIDR CPU part number table with values from
https://github.com/torvalds/linux/blob/master/arch/arm64/include/asm/cputype.h
2017-07-10 15:03:59 +01:00
setrofim
3f1a1c4086 Merge pull request #134 from qperret/gem5stats-instru
instrument: Add power monitoring support on Gem5 platforms
2017-07-10 12:59:37 +01:00
Quentin Perret
7a827e2b11 instrument: Add power monitoring support on Gem5 platforms 2017-07-10 09:49:39 +01:00
Quentin Perret
ce48ad217d module: gem5stats: add an iterator to match records 2017-07-10 09:49:33 +01:00
setrofim
f9bc6966c0 Merge pull request #142 from qperret/gem5stats-module
module: Control and parse gem5's statistics log file
2017-07-07 11:44:02 +01:00
Quentin Perret
baedd676a9 module: Control and parse gem5's statistics log file
Gem5's statistics log file contains plenty of interesting information
that are not exposed so far. This module enables control and parsing of
the statistics file by:
 - configuring periodic dumps of statistics;
 - marking Regions of Interest (ROIs);
 - and extracting values of specific fields during the ROIs.
2017-07-07 11:33:28 +01:00
setrofim
8f63914b85 Merge pull request #143 from valschneider/invoke_bg
Add option to run target.invoke() in the background
2017-07-06 16:08:12 +01:00
Valentin Schneider
c8af995392 doc/target: Add background_invoke() documentation 2017-07-06 16:01:30 +01:00
Valentin Schneider
92b0c25ed3 target: Add background_invoke() method 2017-07-06 16:01:15 +01:00
setrofim
fb58e47cf5 Merge pull request #141 from AnthonyARM/pull/big_little
Check if any big/LITTLE core is online before dereferencing a potentially empty list
2017-06-30 13:20:44 +01:00
Anthony Barbier
3660361df0 Raise a ValueError when trying to set a property of a type of core which is offline 2017-06-30 13:15:23 +01:00
setrofim
86c6a1a826 Merge pull request #139 from AnthonyARM/pull/sudo
Let the user customize the way to execute superuser commands
2017-06-28 17:23:25 +01:00
Anthony Barbier
1199f2512b Check if any big/LITTLE core is online before dereferencing an potentially empty list 2017-06-28 17:15:05 +01:00
Anthony Barbier
c837a29299 Let the user customize the way to execute superuser commands 2017-06-28 15:08:35 +01:00
setrofim
de15658025 Merge pull request #138 from marcbonnici/apk_install
Ports `install_apk` and `get_sdk_version` from WA2
2017-06-23 16:09:36 +01:00
Marc Bonnici
d3396f2725 Target: Added get_sdk_version method
Added the method to retrieve a devices sdk version taken from WA2.
2017-06-23 15:33:57 +01:00
Marc Bonnici
c33dd65249 Target: Updated install_apk to version from WA2
This version of the method adds support for both replacing and downgrading of
APKS.
2017-06-23 15:33:42 +01:00
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