linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Tom Zanussi <tzanussi@gmail.com>
Subject: [BUG] perf: trace -s script is broken
Date: Thu, 12 Aug 2010 11:39:34 +0200	[thread overview]
Message-ID: <AANLkTinSpaSMusUkBZG3-b_hNf5ADfOw2jHE=yE4ysZ_@mail.gmail.com> (raw)

Hi,

I am trying to understand how you're supposed to use perf trace with a
script using tip-x86.
I am running into several problems.

I did:
$ make prefix=/usr
$ sudo make install prefix=/usr

$ sudo perf record -c 1 -e raw_syscalls:sys_enter -a -- sleep 1
$ sudo perf trace -s sctop.py
Can't open python script "sctop.py": No such file or directory

I looked into this a bit more, and sure enough, it seems perf is only looking
in the current subdir to find sctop.py. However if you do:
$ perf trace -l
List of available trace scripts:
  failed-syscalls [comm]               system-wide failed syscalls
  rw-by-file <comm>                    r/w activity for a program, by file
  rw-by-pid                            system-wide r/w activity
  rwtop [interval]                     system-wide r/w top
  wakeup-latency                       system-wide min/max/avg wakeup latency
  workqueue-stats                      workqueue stats (ins/exe/create/destroy)
  failed-syscalls-by-pid [comm]        system-wide failed syscalls, by pid
  sctop [comm] [interval]              syscall top
  syscall-counts-by-pid [comm]         system-wide syscall counts, by pid
  syscall-counts [comm]                system-wide syscall counts

The listing requires trace to look at /usr/libexec/perf-core/scripts/*

I think in builtin-trace.c, you need to add the path prefix, perf_path_exec()
to the script_name for this to work correctly. Or am I missing something here?

Similarly, all the -report scripts installed via make install, still
have the ~/libexec
prefix hardcoded into them. I believe those should be relative to the
install prefix
instead.

             reply	other threads:[~2010-08-12  9:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-12  9:39 Stephane Eranian [this message]
2010-08-12 17:56 ` [BUG] perf: trace -s script is broken Tom Zanussi

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='AANLkTinSpaSMusUkBZG3-b_hNf5ADfOw2jHE=yE4ysZ_@mail.gmail.com' \
    --to=eranian@google.com \
    --cc=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tzanussi@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).