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.
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.
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.
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.
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.
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).
- `Instrument.channels` is a dictionary, we want the values not the
keys; this is provded by `list_channels`.
- `InstrumentChannel` objects do not have a `measure` attribute. Use
`kind` instead.
Previously trying to pull a file from an android target would fail if the file
was owned by root, this commit adds read permissions to the file before
attempting to pull.
If a command is executed "as_root", SshConnection always prepended
"sudo" invocation to the command, even if the user name is "root". This
causes problems on patforms that do not have "sudo".
This commit changes this behavior so that sudo is never used for root
users.
On some devices backgrounding a task results in the command returning
immediately with no error. This was falsely interpreted as the command failing
to run, therefore the additional check has been removed.
Targets have been observed where `ps` output contains entries with NAME columns
of the form "[foo bar]". This means the `parts` list is too long and the PsEntry
call reports too many arguments. Since NAME is the rightmost column, just fix
the number of entries we recognise to 8.
If we get an TargetError when trying to set a governor tunable we currently fall
back to an older sysfs layout under the assumption that the file we tried to
write doesn't exist. However it may be that the file exists, but we tried to
write an invalid value (or something else went wrong). In this case we fall back
to the old file location, fail, and produce a nonsense error about the old path
not existing.
Instead, when we get a TargetError, check if the file exists, and fall back to
the old location only if it does not.
As per issue #102, not all devices have permission to list the root directory
causing the ls command to be incorrectly determined. This commit changes the
directory to be checked to the working directory to ensure sufficient
permissions.
This means when caiman is broken you can see the error message, instead of just
finding out later that there is no data.
We still don't detect caiman being broken until we call stop(), but it's still
an improvement.
Fixes issue #98 where the passed `cpus` parameter was ignored when setting the
governor and frequency and set for all cpus instead of those specified in the
passed parameter.
Also fixes kwargs not being correctly passed for governor tunables.
CFLAGS in the makefile were being specified incorrectly.
- the single quotes for forcing all options to be passed as a single
token by the shell.
- Specifying -static and -lc via -Wl is not needed.