mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
Docs: Fixed typos
This commit is contained in:
parent
462aecdca0
commit
3761b488a0
@ -104,14 +104,14 @@ Connection Types
|
|||||||
combination. To see connected devices, you can run ``adb
|
combination. To see connected devices, you can run ``adb
|
||||||
devices`` on the host.
|
devices`` on the host.
|
||||||
:param timeout: Connection timeout in seconds. If a connection to the device
|
:param timeout: Connection timeout in seconds. If a connection to the device
|
||||||
is not esblished within this period, :class:`HostError`
|
is not established within this period, :class:`HostError`
|
||||||
is raised.
|
is raised.
|
||||||
|
|
||||||
|
|
||||||
.. class:: SshConnection(host, username, password=None, keyfile=None, port=None,\
|
.. class:: SshConnection(host, username, password=None, keyfile=None, port=None,\
|
||||||
timeout=None, password_prompt=None)
|
timeout=None, password_prompt=None)
|
||||||
|
|
||||||
A connectioned to a device on the network over SSH.
|
A connection to a device on the network over SSH.
|
||||||
|
|
||||||
:param host: SSH host to which to connect
|
:param host: SSH host to which to connect
|
||||||
:param username: username for SSH login
|
:param username: username for SSH login
|
||||||
@ -160,12 +160,12 @@ Connection Types
|
|||||||
raised.
|
raised.
|
||||||
:param password_prompt: A string with the password prompt used by
|
:param password_prompt: A string with the password prompt used by
|
||||||
``sshpass``. Set this if your version of ``sshpass``
|
``sshpass``. Set this if your version of ``sshpass``
|
||||||
uses somethin other than ``"[sudo] password"``.
|
uses something other than ``"[sudo] password"``.
|
||||||
:param original_prompt: A regex for the shell prompted presented in the Telenet
|
:param original_prompt: A regex for the shell prompted presented in the Telenet
|
||||||
connection (the prompt will be reset to a
|
connection (the prompt will be reset to a
|
||||||
randomly-generated pattern for the duration of the
|
randomly-generated pattern for the duration of the
|
||||||
connection to reduce the possibility of clashes).
|
connection to reduce the possibility of clashes).
|
||||||
This paramer is ignored for SSH connections.
|
This parameter is ignored for SSH connections.
|
||||||
|
|
||||||
|
|
||||||
.. class:: LocalConnection(keep_password=True, unrooted=False, password=None)
|
.. class:: LocalConnection(keep_password=True, unrooted=False, password=None)
|
||||||
@ -189,7 +189,7 @@ Connection Types
|
|||||||
A connection to a gem5 simulation using a local Telnet connection.
|
A connection to a gem5 simulation using a local Telnet connection.
|
||||||
|
|
||||||
.. note:: Some of the following input parameters are optional and will be ignored during
|
.. note:: Some of the following input parameters are optional and will be ignored during
|
||||||
initialisation. They were kept to keep the anology with a :class:`TelnetConnection`
|
initialisation. They were kept to keep the analogy with a :class:`TelnetConnection`
|
||||||
(i.e. ``host``, `username``, ``password``, ``port``,
|
(i.e. ``host``, `username``, ``password``, ``port``,
|
||||||
``password_prompt`` and ``original_promp``)
|
``password_prompt`` and ``original_promp``)
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ Connection Types
|
|||||||
There are two classes that inherit from :class:`Gem5Connection`:
|
There are two classes that inherit from :class:`Gem5Connection`:
|
||||||
:class:`AndroidGem5Connection` and :class:`LinuxGem5Connection`.
|
:class:`AndroidGem5Connection` and :class:`LinuxGem5Connection`.
|
||||||
They inherit *almost* all methods from the parent class, without altering them.
|
They inherit *almost* all methods from the parent class, without altering them.
|
||||||
The only methods discussed belows are those that will be overwritten by the
|
The only methods discussed below are those that will be overwritten by the
|
||||||
:class:`LinuxGem5Connection` and :class:`AndroidGem5Connection` respectively.
|
:class:`LinuxGem5Connection` and :class:`AndroidGem5Connection` respectively.
|
||||||
|
|
||||||
.. class:: LinuxGem5Connection
|
.. class:: LinuxGem5Connection
|
||||||
|
@ -45,19 +45,19 @@ Derived Measurements
|
|||||||
|
|
||||||
Process a :class:`MeasurementsCsv`, returning a list of
|
Process a :class:`MeasurementsCsv`, returning a list of
|
||||||
:class:`DerivedMetric` and/or :class:`MeasurementsCsv` objects that have been
|
:class:`DerivedMetric` and/or :class:`MeasurementsCsv` objects that have been
|
||||||
derived from the input. The exact nature and ordering of the list memebers
|
derived from the input. The exact nature and ordering of the list members
|
||||||
is specific to indivial 'class'`DerivedMeasurements` implementations.
|
is specific to individual 'class'`DerivedMeasurements` implementations.
|
||||||
|
|
||||||
.. method:: DerivedMeasurements.process_raw(\*args)
|
.. method:: DerivedMeasurements.process_raw(\*args)
|
||||||
|
|
||||||
Process raw output from an instrument, returnin a list :class:`DerivedMetric`
|
Process raw output from an instrument, returning a list :class:`DerivedMetric`
|
||||||
and/or :class:`MeasurementsCsv` objects that have been derived from the
|
and/or :class:`MeasurementsCsv` objects that have been derived from the
|
||||||
input. The exact nature and ordering of the list memebers is specific to
|
input. The exact nature and ordering of the list members is specific to
|
||||||
indivial 'class'`DerivedMeasurements` implewmentations.
|
individual 'class'`DerivedMeasurements` implementations.
|
||||||
|
|
||||||
The arguents to this method should be paths to raw output files generated by
|
The arguments to this method should be paths to raw output files generated by
|
||||||
an instrument. The number and order of expected arguments is specific to
|
an instrument. The number and order of expected arguments is specific to
|
||||||
particular implmentations.
|
particular implementations.
|
||||||
|
|
||||||
|
|
||||||
Derived Metric
|
Derived Metric
|
||||||
@ -95,7 +95,7 @@ Available Derived Measurements
|
|||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
.. note:: If a method of the API is not documented for a particular
|
.. note:: If a method of the API is not documented for a particular
|
||||||
implementation, that means that it s not overriden by that
|
implementation, that means that it s not overridden by that
|
||||||
implementation. It is still safe to call it -- an empty list will be
|
implementation. It is still safe to call it -- an empty list will be
|
||||||
returned.
|
returned.
|
||||||
|
|
||||||
@ -121,7 +121,7 @@ Energy
|
|||||||
average power for each power channel in the input CSV. The output will contain
|
average power for each power channel in the input CSV. The output will contain
|
||||||
all energy metrics followed by power metrics. The ordering of both will match
|
all energy metrics followed by power metrics. The ordering of both will match
|
||||||
the ordering of channels in the input. The metrics will by named based on the
|
the ordering of channels in the input. The metrics will by named based on the
|
||||||
sites of the coresponding channels according to the following patters:
|
sites of the corresponding channels according to the following patters:
|
||||||
``"<site>_total_energy"`` and ``"<site>_average_power"``.
|
``"<site>_total_energy"`` and ``"<site>_average_power"``.
|
||||||
|
|
||||||
|
|
||||||
@ -130,20 +130,20 @@ FPS / Rendering
|
|||||||
|
|
||||||
.. class:: DerivedGfxInfoStats(drop_threshold=5, suffix='-fps', filename=None, outdir=None)
|
.. class:: DerivedGfxInfoStats(drop_threshold=5, suffix='-fps', filename=None, outdir=None)
|
||||||
|
|
||||||
Produces FPS (frames-per-second) and other dervied statistics from
|
Produces FPS (frames-per-second) and other derived statistics from
|
||||||
:class:`GfxInfoFramesInstrument` output. This takes several optional
|
:class:`GfxInfoFramesInstrument` output. This takes several optional
|
||||||
parameters in creation:
|
parameters in creation:
|
||||||
|
|
||||||
:param drop_threshold: FPS in an application, such as a game, which this
|
:param drop_threshold: FPS in an application, such as a game, which this
|
||||||
processor is primarily targeted at, cannot reasonably
|
processor is primarily targeted at, cannot reasonably
|
||||||
drop to a very low value. This is specified to this
|
drop to a very low value. This is specified to this
|
||||||
threhold. If an FPS for a frame is computed to be
|
threshold. If an FPS for a frame is computed to be
|
||||||
lower than this treshold, it will be dropped on the
|
lower than this threshold, it will be dropped on the
|
||||||
assumption that frame rednering was suspended by the
|
assumption that frame rendering was suspended by the
|
||||||
system (e.g. when idling), or there was some sort of
|
system (e.g. when idling), or there was some sort of
|
||||||
error, and therefore this should be used in
|
error, and therefore this should be used in
|
||||||
performance calculations. defaults to ``5``.
|
performance calculations. defaults to ``5``.
|
||||||
:param suffix: The name of the gerated per-frame FPS csv file will be
|
:param suffix: The name of the generated per-frame FPS csv file will be
|
||||||
derived from the input frames csv file by appending this
|
derived from the input frames csv file by appending this
|
||||||
suffix. This cannot be specified at the same time as
|
suffix. This cannot be specified at the same time as
|
||||||
a ``filename``.
|
a ``filename``.
|
||||||
@ -170,7 +170,7 @@ FPS / Rendering
|
|||||||
|
|
||||||
As input, this takes a single argument, which should be the path to the raw
|
As input, this takes a single argument, which should be the path to the raw
|
||||||
output file of :class:`GfxInfoFramesInstrument`. The returns stats
|
output file of :class:`GfxInfoFramesInstrument`. The returns stats
|
||||||
accumulated by gfxinfo. At the time of wrinting, the stats (in order) are:
|
accumulated by gfxinfo. At the time of writing, the stats (in order) are:
|
||||||
``janks``, ``janks_pc`` (percentage of all frames),
|
``janks``, ``janks_pc`` (percentage of all frames),
|
||||||
``render_time_50th_ptile`` (50th percentile, or median, for time to render a
|
``render_time_50th_ptile`` (50th percentile, or median, for time to render a
|
||||||
frame), ``render_time_90th_ptile``, ``render_time_95th_ptile``,
|
frame), ``render_time_90th_ptile``, ``render_time_95th_ptile``,
|
||||||
@ -183,20 +183,20 @@ FPS / Rendering
|
|||||||
|
|
||||||
.. class:: DerivedSurfaceFlingerStats(drop_threshold=5, suffix='-fps', filename=None, outdir=None)
|
.. class:: DerivedSurfaceFlingerStats(drop_threshold=5, suffix='-fps', filename=None, outdir=None)
|
||||||
|
|
||||||
Produces FPS (frames-per-second) and other dervied statistics from
|
Produces FPS (frames-per-second) and other derived statistics from
|
||||||
:class:`SurfaceFlingerFramesInstrument` output. This takes several optional
|
:class:`SurfaceFlingerFramesInstrument` output. This takes several optional
|
||||||
parameters in creation:
|
parameters in creation:
|
||||||
|
|
||||||
:param drop_threshold: FPS in an application, such as a game, which this
|
:param drop_threshold: FPS in an application, such as a game, which this
|
||||||
processor is primarily targeted at, cannot reasonably
|
processor is primarily targeted at, cannot reasonably
|
||||||
drop to a very low value. This is specified to this
|
drop to a very low value. This is specified to this
|
||||||
threhold. If an FPS for a frame is computed to be
|
threshold. If an FPS for a frame is computed to be
|
||||||
lower than this treshold, it will be dropped on the
|
lower than this threshold, it will be dropped on the
|
||||||
assumption that frame rednering was suspended by the
|
assumption that frame rendering was suspended by the
|
||||||
system (e.g. when idling), or there was some sort of
|
system (e.g. when idling), or there was some sort of
|
||||||
error, and therefore this should be used in
|
error, and therefore this should be used in
|
||||||
performance calculations. defaults to ``5``.
|
performance calculations. defaults to ``5``.
|
||||||
:param suffix: The name of the gerated per-frame FPS csv file will be
|
:param suffix: The name of the generated per-frame FPS csv file will be
|
||||||
derived from the input frames csv file by appending this
|
derived from the input frames csv file by appending this
|
||||||
suffix. This cannot be specified at the same time as
|
suffix. This cannot be specified at the same time as
|
||||||
a ``filename``.
|
a ``filename``.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Overview
|
Overview
|
||||||
========
|
========
|
||||||
|
|
||||||
A :class:`Target` instance serves as the main interface to the target device.
|
A :class:`Target` instance serves as the main interface to the target device.
|
||||||
There currently three target interfaces:
|
There currently three target interfaces:
|
||||||
|
|
||||||
- :class:`LinuxTarget` for interacting with Linux devices over SSH.
|
- :class:`LinuxTarget` for interacting with Linux devices over SSH.
|
||||||
@ -20,7 +20,7 @@ Acquiring a Target
|
|||||||
To create an interface to your device, you just need to instantiate one of the
|
To create an interface to your device, you just need to instantiate one of the
|
||||||
:class:`Target` derivatives listed above, and pass it the right
|
:class:`Target` derivatives listed above, and pass it the right
|
||||||
``connection_settings``. Code snippet below gives a typical example of
|
``connection_settings``. Code snippet below gives a typical example of
|
||||||
instantiating each of the three target types.
|
instantiating each of the three target types.
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ executed as root.
|
|||||||
from devlib import LocalLinuxTarget
|
from devlib import LocalLinuxTarget
|
||||||
t = LocalLinuxTarget()
|
t = LocalLinuxTarget()
|
||||||
|
|
||||||
# Execute a command
|
# Execute a command
|
||||||
output = t.execute('echo $PWD')
|
output = t.execute('echo $PWD')
|
||||||
|
|
||||||
# Execute command via a subprocess and return the corresponding Popen object.
|
# Execute command via a subprocess and return the corresponding Popen object.
|
||||||
@ -100,7 +100,7 @@ executed as root.
|
|||||||
|
|
||||||
# Run the command in the background on the device and return immediately.
|
# Run the command in the background on the device and return immediately.
|
||||||
# This will not block the connection, allowing to immediately execute another
|
# This will not block the connection, allowing to immediately execute another
|
||||||
# command.
|
# command.
|
||||||
t.kick_off('echo $PWD')
|
t.kick_off('echo $PWD')
|
||||||
|
|
||||||
# This is used to invoke an executable binary on the device. This allows some
|
# This is used to invoke an executable binary on the device. This allows some
|
||||||
@ -125,7 +125,7 @@ File Transfer
|
|||||||
t.pull('/path/to/target/file.txt', '/path/to/local/file.txt')
|
t.pull('/path/to/target/file.txt', '/path/to/local/file.txt')
|
||||||
|
|
||||||
# Install the specified binary on the target. This will deploy the file and
|
# Install the specified binary on the target. This will deploy the file and
|
||||||
# ensure it's executable. This will *not* guarantee that the binary will be
|
# ensure it's executable. This will *not* guarantee that the binary will be
|
||||||
# in PATH. Instead the path to the binary will be returned; this should be
|
# in PATH. Instead the path to the binary will be returned; this should be
|
||||||
# used to call the binary henceforth.
|
# used to call the binary henceforth.
|
||||||
target_bin = t.install('/path/to/local/bin.exe')
|
target_bin = t.install('/path/to/local/bin.exe')
|
||||||
@ -133,7 +133,7 @@ File Transfer
|
|||||||
output = t.execute('{} --some-option'.format(target_bin))
|
output = t.execute('{} --some-option'.format(target_bin))
|
||||||
|
|
||||||
The usual access permission constraints on the user account (both on the target
|
The usual access permission constraints on the user account (both on the target
|
||||||
and the host) apply.
|
and the host) apply.
|
||||||
|
|
||||||
Process Control
|
Process Control
|
||||||
~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~
|
||||||
@ -173,7 +173,7 @@ Super User Privileges
|
|||||||
|
|
||||||
It is not necessary for the account logged in on the target to have super user
|
It is not necessary for the account logged in on the target to have super user
|
||||||
privileges, however the functionality will obviously be diminished, if that is
|
privileges, however the functionality will obviously be diminished, if that is
|
||||||
not the case. ``devilib`` will determine if the logged in user has root
|
not the case. ``devlib`` will determine if the logged in user has root
|
||||||
privileges and the correct way to invoke it. You should avoid including "sudo"
|
privileges and the correct way to invoke it. You should avoid including "sudo"
|
||||||
directly in your commands, instead, specify ``as_root=True`` where needed. This
|
directly in your commands, instead, specify ``as_root=True`` where needed. This
|
||||||
will make your scripts portable across multiple devices and OS's.
|
will make your scripts portable across multiple devices and OS's.
|
||||||
@ -193,7 +193,7 @@ working_directory
|
|||||||
by your script on the device and as the destination for all
|
by your script on the device and as the destination for all
|
||||||
host-to-target file transfers. It may or may not permit execution so
|
host-to-target file transfers. It may or may not permit execution so
|
||||||
executables should not be run directly from here.
|
executables should not be run directly from here.
|
||||||
|
|
||||||
executables_directory
|
executables_directory
|
||||||
This directory allows execution. This will be used by ``install()``.
|
This directory allows execution. This will be used by ``install()``.
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ You can collected traces (currently, just ftrace) using
|
|||||||
|
|
||||||
from devlib import AndroidTarget, FtraceCollector
|
from devlib import AndroidTarget, FtraceCollector
|
||||||
t = LocalLinuxTarget()
|
t = LocalLinuxTarget()
|
||||||
|
|
||||||
# Initialize a collector specifying the events you want to collect and
|
# Initialize a collector specifying the events you want to collect and
|
||||||
# the buffer size to be used.
|
# the buffer size to be used.
|
||||||
trace = FtraceCollector(t, events=['power*'], buffer_size=40000)
|
trace = FtraceCollector(t, events=['power*'], buffer_size=40000)
|
||||||
|
@ -23,12 +23,12 @@ it was not specified explicitly by the user.
|
|||||||
inferred from core names (cores with the same name are
|
inferred from core names (cores with the same name are
|
||||||
assumed to be in a cluster).
|
assumed to be in a cluster).
|
||||||
:param big_core: The name of the big core in a big.LITTLE system. If this is
|
:param big_core: The name of the big core in a big.LITTLE system. If this is
|
||||||
not specified it will be inferred (on systems with exactly
|
not specified it will be inferred (on systems with exactly
|
||||||
two clasters).
|
two clusters).
|
||||||
:param model: Model name of the hardware system. If this is not specified it
|
:param model: Model name of the hardware system. If this is not specified it
|
||||||
will be queried at run time.
|
will be queried at run time.
|
||||||
:param modules: Modules with additional functionality supported by the
|
:param modules: Modules with additional functionality supported by the
|
||||||
platfrom (e.g. for handling flashing, rebooting, etc). These
|
platform (e.g. for handling flashing, rebooting, etc). These
|
||||||
would be added to the Target's modules. (See :ref:`modules`\ ).
|
would be added to the Target's modules. (See :ref:`modules`\ ).
|
||||||
|
|
||||||
|
|
||||||
@ -87,8 +87,8 @@ support additional configuration:
|
|||||||
:uefi-shell: Boot by going via the UEFI shell.
|
:uefi-shell: Boot by going via the UEFI shell.
|
||||||
:u-boot: Boot using Das U-Boot.
|
:u-boot: Boot using Das U-Boot.
|
||||||
:bootmon: Boot directly via Versatile Express Bootmon
|
:bootmon: Boot directly via Versatile Express Bootmon
|
||||||
using the values provided for ``image``,
|
using the values provided for ``image``,
|
||||||
``initrd``, ``fdt``, and ``bootargs``
|
``initrd``, ``fdt``, and ``bootargs``
|
||||||
parameters.
|
parameters.
|
||||||
|
|
||||||
This defaults to ``u-boot`` for :class:`Juno` and
|
This defaults to ``u-boot`` for :class:`Juno` and
|
||||||
|
Loading…
x
Reference in New Issue
Block a user