* Re: perf not working for some commands?
2014-01-21 2:58 perf not working for some commands? David Li
@ 2014-01-28 9:22 ` Jiri Olsa
2014-01-29 6:55 ` Namhyung Kim
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Olsa @ 2014-01-28 9:22 UTC (permalink / raw)
To: David Li; +Cc: linux-perf-users
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
^ permalink raw reply [flat|nested] 3+ messages in thread