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:
parent
792101819a
commit
0d259be01b
@ -141,7 +141,7 @@ class PerfCollector(CollectorBase):
|
|||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
for command in self.commands:
|
for command in self.commands:
|
||||||
self.target.kick_off(command)
|
self.target.kick_off(command, as_root=self.target.is_rooted)
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self.target.killall(self.perf_type, signal='SIGINT',
|
self.target.killall(self.perf_type, signal='SIGINT',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user