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

collector/perf: Run perf as root if the target is rooted

If you want to collect events by event id (eg. in simpleperf, "rNNN"
with NNN a number), you must run it as root.  Otherwise, simpleperf
fails with a SIGABRT.

Run simpleperf as root by default if the target is rooted to avoid
this.
This commit is contained in:
Javi Merino 2021-02-01 17:52:02 +00:00 committed by Marc Bonnici
parent 792101819a
commit 0d259be01b

View File

@ -141,7 +141,7 @@ class PerfCollector(CollectorBase):
def start(self):
for command in self.commands:
self.target.kick_off(command)
self.target.kick_off(command, as_root=self.target.is_rooted)
def stop(self):
self.target.killall(self.perf_type, signal='SIGINT',