linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3] perf script: Find script file relative to exec path
Date: Mon, 24 May 2021 11:40:32 +0200	[thread overview]
Message-ID: <YKt0kMqeIq5ypW4O@krava> (raw)
In-Reply-To: <20210524065718.11421-1-adrian.hunter@intel.com>

On Mon, May 24, 2021 at 09:57:18AM +0300, Adrian Hunter wrote:
> Allow perf script to find a script in the exec path.
> 
> Example:
> 
> Before:
> 
>  $ perf record -a -e intel_pt/branch=0/ sleep 0.1
>  [ perf record: Woken up 1 times to write data ]
>  [ perf record: Captured and wrote 0.954 MB perf.data ]
>  $ perf script intel-pt-events.py 2>&1 | head -3
>    Error: Couldn't find script `intel-pt-events.py'
>    See perf script -l for available scripts.
>  $ perf script -s intel-pt-events.py 2>&1 | head -3
>  Can't open python script "intel-pt-events.py": No such file or directory
>  $ perf script ~/libexec/perf-core/scripts/python/intel-pt-events.py 2>&1 | head -3
>    Error: Couldn't find script `/home/ahunter/libexec/perf-core/scripts/python/intel-pt-events.py'
>    See perf script -l for available scripts.
>  $
> 
> After:
> 
>  $ perf script intel-pt-events.py 2>&1 | head -3
>  Intel PT Power Events and PTWRITE
>             perf  8123/8123  [000]       551.230753986     cbr:  42  freq: 4219 MHz  (156%)                0 [unknown] ([unknown])
>             perf  8123/8123  [001]       551.230808216     cbr:  42  freq: 4219 MHz  (156%)                0 [unknown] ([unknown])
>  $ perf script -s intel-pt-events.py 2>&1 | head -3
>  Intel PT Power Events and PTWRITE
>             perf  8123/8123  [000]       551.230753986     cbr:  42  freq: 4219 MHz  (156%)                0 [unknown] ([unknown])
>             perf  8123/8123  [001]       551.230808216     cbr:  42  freq: 4219 MHz  (156%)                0 [unknown] ([unknown])
>  $ perf script ~/libexec/perf-core/scripts/python/intel-pt-events.py 2>&1 | head -3
>  Intel PT Power Events and PTWRITE
>             perf  8123/8123  [000]       551.230753986     cbr:  42  freq: 4219 MHz  (156%)                0 [unknown] ([unknown])
>             perf  8123/8123  [001]       551.230808216     cbr:  42  freq: 4219 MHz  (156%)                0 [unknown] ([unknown])
>  $
> 
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>

Acked-by: Jiri Olsa <jolsa@redhat.com>

thanks,
jirka


  reply	other threads:[~2021-05-24  9:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24  6:57 [PATCH V3] perf script: Find script file relative to exec path Adrian Hunter
2021-05-24  9:40 ` Jiri Olsa [this message]
2021-05-25 12:51   ` Arnaldo Carvalho de Melo

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=YKt0kMqeIq5ypW4O@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).