From: Tom Zanussi <tzanussi@gmail.com>
To: eranian@google.com
Cc: linux-kernel@vger.kernel.org, acme@infradead.org, mingo@elte.hu,
acme@redhat.com, fweisbec@gmail.com, peterz@infradead.org
Subject: Re: [PATCH] perf trace: get rid of the hard-coded paths in the report scripts
Date: Fri, 13 Aug 2010 23:38:06 -0500 [thread overview]
Message-ID: <1281760686.6598.53.camel@tropicana> (raw)
In-Reply-To: <4c65046e.cae9d80a.0d93.4def@mx.google.com>
Hi Stephane,
On Fri, 2010-08-13 at 10:30 +0200, Stephane Eranian wrote:
> Tom,
>
> Here is version that works for me. Besides the stat() to access() change, I fixed
> the pathname you were building, it was missing the language name. The way I solved
> that is by leveraging the scripting_ops->name field, but for that I had to make sure
> it would match the subdir name, i.e., all lower-case. I also add an error message
> when the script is not found, so users understand what went wrong without turning
> on any sort of debugging.
>
Hmm, I'm not sure why the previous version didn't work for you, since
that version changed all the scripts to the form:
python/sctop.py
which applied to the format string there, "%s/scripts/%s"
gives
..../scripts/python/sctop.py
so it should have worked.
With your version, I get:
root@tropicana:~# perf trace sctop
script python/sctop.py not found
because the script names still have the form python/sctop.py but are
applied to the new format string "%s/scripts/%s/%s" which gives:
..../scripts/python/python/sctop.py
After removing the python/ prefix from all the scripts, everything works
fine:
root@tropicana:~# perf trace sctop
good output...
root@tropicana:~# perf record -c 1 -e raw_syscalls:sys_enter -a -- sleep
1
[ perf record: Woken up 0 times to write data ]
[ perf record: Captured and wrote 22.546 MB perf.data (~985061
samples) ]
root@tropicana:~# perf trace -g python
generated Python script: perf-trace.py
root@tropicana:~# perf trace -s perf-trace.py > out
good output...
Anyway, for all the reasons you stated and the fact that it gets rid of
everything but the bare script name, I think your version is a nice
improvement - I'll repost it along with the small script changes
mentioned shortly.
Tom
next prev parent reply other threads:[~2010-08-14 4:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 17:59 Tom Zanussi
2010-08-12 18:20 ` Arnaldo Carvalho de Melo
2010-08-12 21:29 ` Stephane Eranian
2010-08-12 21:28 ` Stephane Eranian
2010-08-12 21:50 ` Tom Zanussi
2010-08-13 8:30 ` Stephane Eranian
2010-08-14 4:38 ` Tom Zanussi [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-06-18 4:41 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=1281760686.6598.53.camel@tropicana \
--to=tzanussi@gmail.com \
--cc=acme@infradead.org \
--cc=acme@redhat.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®