Re: [PATCH 01/25] perf tools: Fix python code with missing stat dependency

Arnaldo Carvalho de Melo
2015-06-10T20:32:32Z

Em Wed, Jun 10, 2015 at 10:23:48PM +0200, Jiri Olsa escreveu:
> On Wed, Jun 10, 2015 at 03:55:45PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Wed, Jun 10, 2015 at 08:10:34PM +0200, Jiri Olsa escreveu:
> > > The evsel object now depends on stat object and breaks
> > > python code because of missing stat object dependency.
> > > Putting stat.c object into python object list.
> >
> > Applied, but 'perf test python' was Okaying me before and after this
> > change, strange :-\
>
> did you do 'make clean' ? there's not perfect dependency checking
> for python binding building ;-)

I guess I did that, yes ;-)

But to make sure:

[acme@zoo linux]$ type perf
perf is /home/acme/bin/perf
[acme@zoo linux]$ rm -f ~/bin/perf
[acme@zoo linux]$ type perf
bash: type: perf: not found
[acme@zoo linux]$ rm -rf /tmp/build/perf
[acme@zoo linux]$ perf
bash: perf: command not found...
Install package 'perf' to provide command 'perf'? [N/y] n
[acme@zoo linux]$ mkdir -p /tmp/build/perf
[acme@zoo linux]$ alias m
alias m='time make O=/tmp/build/perf -C tools/perf install-bin'
[acme@zoo linux]$ m
make: Entering directory '/home/git/linux/tools/perf'
BUILD: Doing 'make -j4' parallel build

Auto-detecting system features:
... dwarf: [ on ]
... glibc: [ on ]
... gtk2: [ on ]
... libaudit: [ on ]
... libbfd: [ on ]
... libelf: [ on ]
... libnuma: [ on ]
... libperl: [ on ]
... libpython: [ on ]
... libslang: [ on ]
... libunwind: [ on ]
... libdw-dwarf-unwind: [ on ]
... zlib: [ on ]
... lzma: [ on ]

MKDIR /tmp/build/perf/util/
CC /tmp/build/perf/util/abspath.o
MKDIR /tmp/build/perf/fd/
CC /tmp/build/perf/fd/array.o
CC /tmp/build/perf/event-parse.o
<SNIP>
INSTALL perl-scripts
INSTALL python-scripts
INSTALL perf_completion-script
make: Leaving directory '/home/git/linux/tools/perf'

real 0m9.785s
user 0m15.868s
sys 0m5.756s
[acme@zoo linux]$

[acme@zoo linux]$ perf test python
17: Try 'import perf' in python, checking link problems : Ok
[acme@zoo linux]$ su -
Password:
[root@zoo ~]# perf test python
17: Try 'import perf' in python, checking link problems : Ok
[root@zoo ~]# type perf
perf is hashed (/root/bin/perf)
[root@zoo ~]# ls -la ~/bin/perf
lrwxrwxrwx. 1 root root 19 Apr 29 15:58 /root/bin/perf -> /home/acme/bin/perf
[root@zoo ~]#

So, it still works well, without your patch.

- Arnaldo