2010-06-17 14:55:04

by Stephane Eranian

[permalink] [raw]
Subject: [BUG] perf: installed python -report scripts have bogus paths

Hi,

I was looking at the perf trace and python scripting support.
But I quickly ran into an issue. I compiled with:
$ make prefix=/usr
$ make prefix=/usr install

All the scripts are installed in /usr/libexec/perf-core/scripts/.....

The problem is that all the -report scripts have the .py script
paths hardcoded as ~/libexec/.....

Here is an example with syscall-counts-report
perf trace $@ -s ~/libexec/perf-core/scripts/python/syscall-counts.py $comm

That should either be stripped to syscall-counts.py and perf trace adds the
prefix or make install needs to patch the path in. Otherwise I don't see how
this can work unless I am confused about the usage model.


2010-06-18 04:23:05

by Tom Zanussi

[permalink] [raw]
Subject: Re: [BUG] perf: installed python -report scripts have bogus paths

Hi,

On Thu, 2010-06-17 at 16:54 +0200, Stephane Eranian wrote:
> Hi,
>
> I was looking at the perf trace and python scripting support.
> But I quickly ran into an issue. I compiled with:
> $ make prefix=/usr
> $ make prefix=/usr install
>
> All the scripts are installed in /usr/libexec/perf-core/scripts/.....
>
> The problem is that all the -report scripts have the .py script
> paths hardcoded as ~/libexec/.....
>
> Here is an example with syscall-counts-report
> perf trace $@ -s ~/libexec/perf-core/scripts/python/syscall-counts.py $comm
>
> That should either be stripped to syscall-counts.py and perf trace adds the
> prefix or make install needs to patch the path in. Otherwise I don't see how
> this can work unless I am confused about the usage model.

You're right - it's not a great idea to be hard-coding the path in like
this.

I'll submit a patch shortly to have perf trace add the prefix.

Thanks,

Tom