Open mjrousos opened 6 years ago
+1
TI was facing same issue , in my case (and in usual cases) this was happening because this perfcollect internally runs perf executable , thus if you look at line 1737 on perfcollect script :
RunSilent $perfcmd $collectionArgs
here , try to print it like :
` WriteStatus $perfcmd
WriteStatus $collectionArgs
RunSilent $perfcmd $collectionArgs
`
Now, based on output try to run that command with same output argument (should be something like $perfcmd was /usr/bin/perf & $collectionArgs were record
see if that works , as this might fail.
as usually it should be perf record -g -p
hus i modified this perfcollect script to run correct command and issue was resolved.
PerfCollect docs say that as long as a developer execs into a Docker container with --privileged, perfcollect should work, even if the container wasn't itself started with --privileged.
Instead, collection immediately stops and I get this error:
If the container to be profiled is started initially (at
docker run
time) with --privileged and --pid=host (as if I were going to be attaching LLDB), then perfcollect collection works as expected.If perfcollect can be made to work with non-privileged containers, that would be great. Otherwise, we should update the docs to explain the necessary steps for collecting traces in a Docker container.