Linux Perf Users
 help / color / mirror / Atom feed
* perf not working for some commands?
@ 2014-01-21  2:58 David Li
  2014-01-28  9:22 ` Jiri Olsa
  0 siblings, 1 reply; 3+ messages in thread
From: David Li @ 2014-01-21  2:58 UTC (permalink / raw)
  To: linux-perf-users

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!

Thank you.
David

^ permalink raw reply	[flat|nested] 3+ messages in thread

* 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

* Re: perf not working for some commands?
  2014-01-28  9:22 ` Jiri Olsa
@ 2014-01-29  6:55   ` Namhyung Kim
  0 siblings, 0 replies; 3+ messages in thread
From: Namhyung Kim @ 2014-01-29  6:55 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: David Li, linux-perf-users

Hi Jiri,

On Tue, 28 Jan 2014 10:22:03 +0100, Jiri Olsa wrote:
> [jolsa@krava perf]$ strace -fo out ./perf stat krava
> Workload failed: No such file or directory
> [jolsa@krava perf]$ cat out | grep exec

You can also use "strace -f -e execve ./perf stat krava" :)

Thanks,
Namhyung

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-29  6:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox