1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-02-24 05:27:50 +00:00

31 Commits

Author SHA1 Message Date
Marc Bonnici
a4fd57f023 devlib/__init__: Export LogcatCollector in devlib package 2019-12-20 15:16:32 +00:00
Marc Bonnici
19887de71e devlib/trace: Refactor trace to be collector
We now have have multiple `trace` instruments that do not match the
description and therefore are moved to have a more suitably named
hierarchy.
2019-12-20 15:16:32 +00:00
Douglas RAILLARD
f2bc5dbc14 devlib: Re-export DmesgCollector in devlib package
Allow using 'import devlib.DmesgCollector', just like
devlib.FtraceCollector.
2019-06-03 14:16:28 +01:00
Marc Bonnici
c0d8a98d90 setup.py: Use version_helper to generate devlib version
Instead of parsing the text of the file to extract the current version
use the version_helper to access the newly added version tuple.
2019-02-27 10:55:20 +00:00
Marc Bonnici
441eea9897 devlib/version: Implement devlibs version as a namedtuple
Instead of defining devlibs versions as a string use a namedtuple and
add in a revision field.
2019-02-27 10:55:20 +00:00
Marc Bonnici
3c4a282c29 devlib/version: Update to development version 2019-01-04 11:22:03 +00:00
Marc Bonnici
683da92067 devlib: Version Bump to v1.1 2018-12-21 10:49:14 +00:00
Marc Bonnici
8654a6dc2b devlib: Add development tag to version number
To allows better versioning control between releases add `dev1` to the
current version. This allows other under development tools such as
Workload Automation to ensure that a sufficiently up to date version of
devlib is installed on the system.
2018-09-21 13:04:27 +01:00
Pierre-Clement Tosi
63d2fb53fc Instrument/BaylibreAcme: Add IIO-based ACME instr.
Add BaylibreAcmeInstrument, a new instrument providing support for the
Baylibre ACME board as a wrapper for the IIO interface. This class
provides better access to the ACME hardware (e.g. the ability to control
the sampling frequency) and to the retrieved samples than what the other
instrument, AcmeCapeInstrument, provides. Furthermore, it removes an
unnecessary and limiting dependency by interfacing directly with the IIO
drivers instead of relying on an intermediate script ("iio-capture") potentially
introducing unexpected bugs. Finally, it allows handling multiple probes
(the ACME can have up to 8) through an easy-to-use single instance of this
class instead of having to have an instance of AcmeCapeInstrument per channel
potentially (untested) leading to race conditions between the underlying
scripts for accessing the hardware.

This commit does not overwrite AcmeCapeInstrument as
BaylibreAcmeInstrument does not provide interface compatibility with
that class. Anyhow, we believe that anything that can be achieved with
AcmeCapeInstrument can be done with BaylibreAcmeInstrument (the
reciprocal is not true) so that BaylibreAcmeInstrument might eventually
replace AcmeCapeInstrument.

Add BaylibreAcmeInstrument documentation detailing the class interface
and the ACME instrument itself and discussing the way it works and its
potential limitations.
2018-08-22 16:00:25 +01:00
Marc Bonnici
30dc161f12 trace/perf: Add support for collecting metrics with perf 2018-08-22 14:43:47 +01:00
Douglas RAILLARD
511d478164 exceptions: Classify transient exceptions
Exceptions such as TargetError can sometimes be raised because of a
network issue, which is useful to distinguish from errors caused by a
missing feature for automated testing environments.

The following exceptions are introduced:
* DevlibStableError: raised when a non-transient error is encountered
    * TargetStableError

* DevlibTransientError: raised when a transient error is encountered,
including timeouts.
    * TargetTransientError

When there is an ambiguity on the type of exception to use, it can be
assumed that the configuration is correct, and therefore it is a
transient error, unless the function is specifically designed to probe a
property of the system. In that case, ambiguity is allowed to be lifted
by assuming a non-transient error, since we expect it to raise an
exception when that property is not met. Such ambiguous case can appear
when checking Android has booted, since we cannot know if this is a
timeout/connection issue, or an actual issue with the Android build or
configuration. Another case are the execute() methods, which can be
expected to fail on purpose. A new parameter will_succeed=False is
added, to automatically turn non transient errors into transient ones if
the caller is 100% sure that the command cannot fail unless there is an
environment issue that is outside of the scope controlled by the user.

devlib now never raises TargetError directly, but one of
TargetStableError or TargetTransientError. External code can therefore
rely on all (indirect) instances TargetError to be in either category.
Most existing uses of TargetError are replaced by TargetStableError.
2018-08-15 14:32:53 +01:00
Marc Bonnici
d6d322c8ac devlib/__init__: Update installed version to conform with PEP440
In commit fec0868 setup.py was updated to ensure that commit id is
included within the package version however this was not updated to
reflect the change.
2018-07-26 11:50:46 +01:00
Marc Bonnici
34c6d1983b version: Release version 1.0.0 2018-07-06 14:56:47 +01:00
Sergei Trofimov
9fd690efb3 Update copyrights
- Update the year in the copyrights to match the last year the file was
  modified.
- Add the copyright header to files that did not already have one.
2018-07-04 16:01:47 +01:00
Sergei Trofimov
cc04e1a839 Implement PEP396
Implement PEP396 which specifies that a package should advertise its
version via __version__ attribute.

As devlib is often used as a development version directly from source,
also add a __full_version__ attribute which appends the current commit
ID to the version.

Use the __full_version__ inside setup.py
2018-06-15 08:58:35 +01:00
Sascha Bischoff
6abe6067da trace/serial_trace: Add capability to trace serial traffic
We add a TraceCollector which logs the traffic on a serial port. This
can then be used to debug why a board crashes, or to extract extra
information from the device whilst it is running a workload.
2018-06-13 14:36:17 +01:00
Vincent Guittot
a0fc7202a1 Add a new Arm Energy Probe instrument
Add new energy instrument that is based on arm-probe tool to manage AEP
Main advantages of this tool are:
- uses a config file for describing channels and shunt resistors value
- manages power topology description in the config file. This topology
is then used when computing power figures
- can create virtual power channel and aggregate channels
- support multiple AEP
- support auto-zero of AEP's channel

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
2018-02-26 17:53:58 +00:00
Marc Bonnici
e9cf7f5cbe target: Adds initial support for ChromeOs targets
Adds initial support for ChromeOs Targets.

If the device does not support running android apps the target will
behave like a `LinuxTarget` however if android is supported, the chromeos
target opens 2 connections, one via shh to the linux target, as normal,
and one via adb to the android container. By default all calls will be
made to the linux target and if not present, will attempt to use the
android container instead. The android container is also exposed via a
`android_container` attribute so can be accessed directly.

In order to detect whether the target supports running android apps the
existance of '/opt/google/containers/android/' will be queried upon
connection to the linux target.
2018-01-25 06:27:55 +00:00
Sergei Trofimov
9f666320f3 derived: add DerivedSurfaceFlingerStats
Add DerivedSurfaceFlingerStats that parse output from
SurfaceFlingerFramesInstrument to produce FPS data and rendering
statistics.
2017-09-27 14:45:27 +01:00
Sergei Trofimov
f692315d9c derived: add DerivedGfxInfoStats
Add DerivedGfxInfoStats that parse output from GfxInfoFramesInstrument
to produce FPS data and rendering statistics.
2017-09-27 14:45:27 +01:00
Sergei Trofimov
dd26b43ac5 derived: DerivedMeasurments now return DerivedMetrics
DerivedMeasurments processors now return DerviedMetrics rather than
measurments. The notion of an InstrumentChannel doesn't really make
sense in the context of DerivedMeasurments, which are not directly
measured on the target. Since Measurement's require a channel, a simpler
DerviedMetric is added that only requires a name and a type.
2017-09-19 13:34:43 +01:00
Sergei Trofimov
ff366b3fd9 derived: renamed derived_measurments --> energy
Renamed to reduce redandancy in import path.
2017-09-19 13:34:42 +01:00
Marc Bonnici
c093d56754 DerivedMeasurements: Add DerivedEnergyMeasurments
Adds `DerivedMeasurements` which are designed to perform post processing on
a provided MeasurementCsv.
Currently only a `DerivedEnergyMeasurements` class has been added which
has 2 purposes:
- Calculate energy from power results if not present using recorded timestamps,
  falling back to a provided sample rate
- Calculate cumulative energy and average power from a specified MeasurementCSV
  file.
2017-08-18 18:02:48 +01:00
Quentin Perret
7a827e2b11 instrument: Add power monitoring support on Gem5 platforms 2017-07-10 09:49:39 +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
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
Anouk Van Laer
e9cf93e754 gem5: Addition of gem5 simulation platform
This commit adds a gem5 simulation platform. The platform is responsible for starting the gem5 simulation.

 Changes to be committed:
	modified:   devlib/__init__.py
	modified:   devlib/platform/__init__.py
	new file:   devlib/platform/gem5.py
2017-02-08 11:12:17 +00:00
Anouk Van Laer
29a7940731 gem5: Addition of a gem5 connection
This is the first in a series of commits to allow for the use of gem5 as a target in devlib.
The interaction with the gem5 simulation is done by the Gem5Connection, a type of TelnetConnection.
There are two types of Gem5Connections (Linux and Android) as they differ slightly in the implementation
of some methods. Other types of connections have only been changed to make them uniform (e.g. arguments for init method)

 Changes to be committed:
	modified:   devlib/__init__.py
	modified:   devlib/host.py
	modified:   devlib/utils/android.py
	modified:   devlib/utils/ssh.py
2017-02-08 11:12:17 +00:00
Sergei Trofimov
b3cea0c0d2 TelnetConnction: splitting from SshConnection
Perviously, a parameter passed into SshConnection controlled whether the
connection was established over SSH or Telnet. Now, there is a separate
class for Telnet connections.
2016-12-08 11:50:17 +00:00
Sergei Trofimov
889f72c883 Adding connection classes to main __init__.py
Now that connection classes can be passed as arguments on Target
instatiation, they are part of the user-facing API and are marked as
such by exporting them in the main __init__.py
2016-12-07 18:13:55 +00:00
Sergei Trofimov
4e6afe960b devlib initial commit. 2015-10-09 09:30:04 +01:00