* [BUG] perf: trace -s script is broken
@ 2010-08-12 9:39 Stephane Eranian
2010-08-12 17:56 ` Tom Zanussi
0 siblings, 1 reply; 2+ messages in thread
From: Stephane Eranian @ 2010-08-12 9:39 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Ingo Molnar, linux-kernel, Arnaldo Carvalho de Melo,
Frederic Weisbecker, Peter Zijlstra, Tom Zanussi
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [BUG] perf: trace -s script is broken
2010-08-12 9:39 [BUG] perf: trace -s script is broken Stephane Eranian
@ 2010-08-12 17:56 ` Tom Zanussi
0 siblings, 0 replies; 2+ messages in thread
From: Tom Zanussi @ 2010-08-12 17:56 UTC (permalink / raw)
To: Stephane Eranian
Cc: Arnaldo Carvalho de Melo, Ingo Molnar, linux-kernel,
Arnaldo Carvalho de Melo, Frederic Weisbecker, Peter Zijlstra
Hi,
On Thu, Aug 12, 2010 at 4:39 AM, Stephane Eranian <eranian@google.com> wrote:
> 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.
>
Yeah, I had previously submitted a patch to fix this, but that patch
introduced another bug.
I'll send an updated v2 patch shortly that should fix both problems...
Thanks,
Tom
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-12 17:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-12 9:39 [BUG] perf: trace -s script is broken Stephane Eranian
2010-08-12 17:56 ` Tom Zanussi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.