Linux Perf Users
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: David Li <android.wm.edu@gmail.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: perf not working for some commands?
Date: Tue, 28 Jan 2014 10:22:03 +0100	[thread overview]
Message-ID: <20140128092203.GC1229@krava.brq.redhat.com> (raw)
In-Reply-To: <CACTzACVZLm00yVZag5Hf-c_u0tdH+cQT0=8B_XS8BrN5cT2mDA@mail.gmail.com>

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

  reply	other threads:[~2014-01-28  9:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21  2:58 perf not working for some commands? David Li
2014-01-28  9:22 ` Jiri Olsa [this message]
2014-01-29  6:55   ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140128092203.GC1229@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=android.wm.edu@gmail.com \
    --cc=linux-perf-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox