On Mon, Jan 20, 2014 at 09:58:15PM -0500, David Li wrote: > Hi everyone, > I'd like to use perf to profile the monkey command on Android, but I > got stuck with this. > > Normally, when I run following: > > monkey -v -p com.google.android.youtube 500 > > -it works (it generates 500 user events for youtube) > > BUT, when I want to get the perf stat of it as follows: > > perf stat monkey -v -p com.google.android.youtube 500 > > I get: > > monkey: No such file or directory > Terminated > > > monkey is a command, not a file nor a directory. Why am I getting > this? Any help will be greatly appreciated!
perf calls execvp to run the command.. make sure the program is within the PATH variable location you can where perf searches by: [jolsa@krava perf]$ strace -fo out ./perf stat krava Workload failed: No such file or directory [jolsa@krava perf]$ cat out | grep exec 5308 execve("./perf", ["./perf", "stat", "krava"], [/* 36 vars */]) = 0 5309 execve("/home/jolsa/libexec/perf-core/krava", ["krava"], [/* 37 vars */]) = -1 ENOENT (No such file or directory) 5309 execve("/home/jolsa/kernel.org/linux-perf/tools/perf/./krava", ["krava"], [/* 37 vars */]) = -1 ENOENT (No such file or directory) 5309 execve("/usr/lib64/qt-3.3/bin/krava", ["krava"], [/* 37 vars */]) = -1 ENOENT (No such file or directory) 5309 execve("/usr/local/bin/krava", ["krava"], [/* 37 vars */]) = -1 ENOENT (No such file or directory) 5309 execve("/bin/krava", ["krava"], [/* 37 vars */]) = -1 ENOENT (No such file or directory) 5309 execve("/usr/bin/krava", ["krava"], [/* 37 vars */]) = -1 ENOENT (No such file or directory) 5309 execve("/usr/local/sbin/krava", ["krava"], [/* 37 vars */]) = -1 ENOENT (No such file or directory) 5309 execve("/usr/sbin/krava", ["krava"], [/* 37 vars */]) = -1 ENOENT (No such file or directory) 5309 execve("/opt/mocp/bin/krava", ["krava"], [/* 37 vars */]) = -1 ENOENT (No such file or directory) 5309 execve("/home/jolsa/.local/bin/krava", ["krava"], [/* 37 vars */]) = -1 ENOENT (No such file or directory) 5309 execve("/home/jolsa/bin/krava", ["krava"], [/* 37 vars */]) = -1 ENOENT (No such file or directory) 5309 execve("/opt/mocp/bin/krava", ["krava"], [/* 37 vars */]) = -1 ENOENT (No such file or directory) jirka -- To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html