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

1170 Commits

Author SHA1 Message Date
Sergei Trofimov
b53245344b target: fixed get_installed() on new targets
get_installed() looks in self.executables_directory for the binary. This
may not exist on a target (this is created when setup() is invoked).
This commit updated get_installed() to check whether target_directory
exists first, avoiding the error.
2015-11-18 18:11:59 +00:00
Sergei Trofimov
961f9576e5 target: resolve default paths eariler during the connection
Default paths for working_directory and exectuables_directory used to be
resolved at the end of the connect (because for Linux targets, the
default changes depending on the connection). This is now offloaded to a
separate internal method that is invoked earlier during connect() (after
the connection is established but before other connection actions are
resolved, as some of those actions rely on the directories being set).
2015-11-18 17:38:42 +00:00
setrofim
d4c8b0f222 Merge pull request #4 from derkling/cpufreq-tracing
Add support to properly trace CPUs frequencies
2015-11-16 18:06:10 +00:00
Patrick Bellasi
a7cfd28bd0 ftrace: force report CPU frequencies at trace start and stop
When the cpufreq module is loaded, quite likely we want to run experiments
which involve an analysis of frequencies transitions. However, if during
an experiment there are not cpu_frequency events, the generated trace
does not allows to know at which frequency the experiment has been executed.
This happens for example when we are running at constant frequency or just
because the workload is not generating a variable capacity request in the
system.

This path ensure the a "cpu_frequency" events is always generated at the
beginning and at the end of a collected trace. This support is required
for example to properly plot CPUs frequencies event when there are not
CPUFreq generated changes of OPP.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-11-16 17:47:58 +00:00
Patrick Bellasi
701e6adf7a cpufreq: add method to trace current frequencies
This patch add a method which allows to inject into a trace a "cpu_frequency"
event for each CPU reporting the current frequency the CPU is running at.
Such a method could be useful to force report CPUs frequency into a trace
file, for example at tracing start and stop, thus allowing to know always
at which frequency an experiment has been executed.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-11-16 17:47:58 +00:00
setrofim
f46057f836 Merge pull request #3 from derkling/drk-for-master
Fixes and additions for master
2015-11-13 08:24:09 +00:00
setrofim
b6ae0f4aa2 Merge pull request #2 from derkling/drk-adds
CPUFreq: add some methods
2015-11-13 08:23:57 +00:00
Patrick Bellasi
b598b38f12 cpufreq: add methods to configure all CPUs at once
Sometimes it could be required to change governor or frequency for a all the
online CPUs of a target. This patch provides an utility method to easily
do that using a single method call.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-11-12 19:35:25 +00:00
Patrick Bellasi
4dcb4974e5 cpufreq: add methods to set the governor for a specified set of CPUs
Sometimes it could be required to change the governor for a set of different
CPUs. This patch provides an utility method to easily and achieve that with
a single method call.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-11-12 19:35:25 +00:00
Patrick Bellasi
9c9a74826a cgroups: big refactoring to make it more generic
This patch refactors the CGroup module to support multiple controllers.
The new interface is based on two main classes:

.:: Controller(kind)

    Provides a wrapper class for a CGgroup controller of "kind".
    At module initialization time, all the controller available in the
    system are enumerated and a corresponding controller class created.

    A valid reference to the Controller class for a specific CGroup
    controller can be obtained using the controller(kind) method exposed
    by the module, e.g. to get a reference to the CPUSET controller:
	cpuset = target.cgroups.controller('cpuset')

.:: CGroup(name)

    Provides a wrapper class for a CGroup of "name", i.e. a folder which
    path is "name" relative to the controller mount point.
    At module initialization time, the root control group for each
    controller is created by the controller class.

    A valid reference to a CGroup for a specific controller can be
    obtained using the cgroup(name) method exposed by the controller
    object, e.g. to get a reference to the "/LITTLE" cgroup of the
    cpuset controller:
        cpuset_littles = cpuset.cgroup('/LITTLE')

The CGroup object exposes simple get()/set() methods which allows to
read and configure all the supported attributes of a controller.

For example, to set the "cpus" of a cpuset control group:
       cpuset_littles.set(cpus=[0,1])

NOTE: the set() method accepts a variable list of parameters which name
must match a valid (writable) attribute for that controller.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-11-12 19:20:09 +00:00
Patrick Bellasi
10c80a94ad ssh: disable commands echo
This should help on fixing issue related to echoed commands which make
it difficult to parse the commands results.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-11-10 18:30:48 +00:00
Patrick Bellasi
5d288efa9c ssh: increase terminal size to avoid issues with echoed command parsing
By default the terminal emulated by pxssh is 24x80 in size, which force
the addition of unwanted "\r" in long commands. These \r are painful to
parse and remove from the echoed command.

This patch tries to alleviate this issue by setting a bigger TTY terminal
by default. A 200 columns display should be big enough to execute most
of the commands. In case longer commands are required it is better
have them on a script to push on the target for execution.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-11-10 18:30:48 +00:00
setrofim
db14589886 Merge pull request #1 from derkling/drk-fixups
Fixup some modules initialization
2015-10-16 10:45:35 +01:00
Patrick Bellasi
68e5e83864 utils/serial_port: fix fdpexpect import for pexpect versions >= 4.0
The pexpect module exposes a fdpexpect class starting from version 4.0.
This patch makes uses of the proper pxssh import statement depending on the
version of pexpect available in the host.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-10-12 18:35:29 +01:00
Patrick Bellasi
c1d7cfafcc utils/ssh: fix pxssh import for pexpect versions >= 4.0
The pexpect module exposes a pxssh class starting from version 4.0.
This patch makes uses of the proper pxssh import statement depending on the
version of pexpect available in the host.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-10-12 18:35:29 +01:00
Patrick Bellasi
b83e51856d target: fix 'bl' module initialisation
When "load_default_modules" is set to False at target initialisation time
but the "bl" module is explicitly required, the initialization of this module
fails because the system as not yet been identified as a big.LITTLE.
This identification is performed by platform.update_from_target.

This patch post-pone modules initialisation at the end of the connection
method to ensure that all the required information are available at modules
probe time.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-10-12 18:35:29 +01:00
Patrick Bellasi
cbe80da3a1 cpufreq: make probing more robust
On some machines, when a different CPUFreq policy could be configured
for each CPU, there is not a top-level 'cpufreq' folder exposed
at top level but just per-CPU ones.

This patch makes the probing for CPUFreq support more robust by checking
on all the supported paths.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-10-12 18:35:29 +01:00
Patrick Bellasi
b19d76d4b0 cpufreq: fix probe method to support Intel machine
Recent Intel machines uses the CPUFreq pstate driver, which does not create
the standard "/sys/devices/system/cpu/cpufreq" folder usually created by
other (mostly ARM platform) drivers.

This patch fixes the probe method to check for the propert pstate driver
being available in order to enabled the CPUFreq module.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-10-12 18:35:29 +01:00
Patrick Bellasi
7ba791b2a7 hotplug: make hotplug probing more robust
In general it makes not sense to hotplug out all the CPUs of a system, thus
ususally CPU0 is configured as not hot/plugggable.
Definitively, on a single core system it does not make sense to hotpolug out
the only available CPU.

This patch switch to usage of CPU1 for hotplug support probing, which is the
really first one for which enabling hotplug could be useful.

Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
2015-10-12 18:35:29 +01:00
Sergei Trofimov
4e6afe960b devlib initial commit. 2015-10-09 09:30:04 +01:00