* perf: python3 + tests attr.py failing
@ 2019-02-04 15:10 Arnaldo Carvalho de Melo
2019-02-04 20:37 ` Jiri Olsa
0 siblings, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-02-04 15:10 UTC (permalink / raw)
To: Jiri Olsa
Cc: Namhyung Kim, Adrian Hunter, Tony Jones, Ravi Bangoria,
Seeteena Thoufeek, Linux Kernel Mailing List
Noticed this now when building with PYTHON=python3, can you take a look?
For now I'm reinstalling python2-devel and building with it, i.e.
removing that PYTHON=python3 make command line variable.
[root@quaco ~]# perf test -v perf_event_attr
16: Setup struct perf_event_attr :
--- start ---
test child forked, pid 23937
File "/home/acme/libexec/perf-core/tests/attr.py", line 325
except Unsup, obj:
^
SyntaxError: invalid syntax
test child finished with -1
---- end ----
Setup struct perf_event_attr: FAILED!
[root@quaco ~]# find
Reverting back to building with python2-devel makes it work:
make O=/tmp/build/perf -C tools/perf install-bin
[acme@quaco perf]$ ldd ~/bin/perf | grep python
libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00007fe283792000)
[acme@quaco perf]$
[root@quaco ~]# perf test perf_event_attr
16: Setup struct perf_event_attr : Ok
[root@quaco ~]#
- Arnaldo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: perf: python3 + tests attr.py failing
2019-02-04 15:10 perf: python3 + tests attr.py failing Arnaldo Carvalho de Melo
@ 2019-02-04 20:37 ` Jiri Olsa
2019-02-05 13:02 ` Arnaldo Carvalho de Melo
2019-02-05 13:49 ` Arnaldo Carvalho de Melo
0 siblings, 2 replies; 7+ messages in thread
From: Jiri Olsa @ 2019-02-04 20:37 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Jiri Olsa, Namhyung Kim, Adrian Hunter, Tony Jones,
Ravi Bangoria, Seeteena Thoufeek, Linux Kernel Mailing List
On Mon, Feb 04, 2019 at 12:10:42PM -0300, Arnaldo Carvalho de Melo wrote:
> Noticed this now when building with PYTHON=python3, can you take a look?
> For now I'm reinstalling python2-devel and building with it, i.e.
> removing that PYTHON=python3 make command line variable.
>
> [root@quaco ~]# perf test -v perf_event_attr
> 16: Setup struct perf_event_attr :
> --- start ---
> test child forked, pid 23937
> File "/home/acme/libexec/perf-core/tests/attr.py", line 325
> except Unsup, obj:
> ^
> SyntaxError: invalid syntax
> test child finished with -1
> ---- end ----
> Setup struct perf_event_attr: FAILED!
hum, I built the same way like you 'make PYTHON=python3'
[root@krava perf]# ldd ./perf | grep python
libpython3.6m.so.1.0 => /lib64/libpython3.6m.so.1.0 (0x00007f4ca7cc4000)
and get 'Ok result'
[root@krava perf]# ./perf test attr
16: Setup struct perf_event_attr : Ok
48: Synthesize attr update : Ok
[root@krava perf]# python3 --version
Python 3.6.8
[root@krava perf]# rpm -qa | grep python3-devel
python3-devel-3.6.8-1.fc28.x86_64
which Fedora are you on 29? I'm on 28
jirka
> [root@quaco ~]# find
>
> Reverting back to building with python2-devel makes it work:
>
> make O=/tmp/build/perf -C tools/perf install-bin
>
> [acme@quaco perf]$ ldd ~/bin/perf | grep python
> libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00007fe283792000)
> [acme@quaco perf]$
>
> [root@quaco ~]# perf test perf_event_attr
> 16: Setup struct perf_event_attr : Ok
> [root@quaco ~]#
>
> - Arnaldo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: perf: python3 + tests attr.py failing
2019-02-04 20:37 ` Jiri Olsa
@ 2019-02-05 13:02 ` Arnaldo Carvalho de Melo
2019-02-05 13:08 ` Arnaldo Carvalho de Melo
2019-02-05 13:49 ` Arnaldo Carvalho de Melo
1 sibling, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-02-05 13:02 UTC (permalink / raw)
To: Jiri Olsa
Cc: Jiri Olsa, Namhyung Kim, Adrian Hunter, Tony Jones,
Ravi Bangoria, Seeteena Thoufeek, Linux Kernel Mailing List
Em Mon, Feb 04, 2019 at 09:37:38PM +0100, Jiri Olsa escreveu:
> On Mon, Feb 04, 2019 at 12:10:42PM -0300, Arnaldo Carvalho de Melo wrote:
> > Noticed this now when building with PYTHON=python3, can you take a look?
> > For now I'm reinstalling python2-devel and building with it, i.e.
> > removing that PYTHON=python3 make command line variable.
> >
> > [root@quaco ~]# perf test -v perf_event_attr
> > 16: Setup struct perf_event_attr :
> > --- start ---
> > test child forked, pid 23937
> > File "/home/acme/libexec/perf-core/tests/attr.py", line 325
> > except Unsup, obj:
> > ^
> > SyntaxError: invalid syntax
> > test child finished with -1
> > ---- end ----
> > Setup struct perf_event_attr: FAILED!
>
> hum, I built the same way like you 'make PYTHON=python3'
> [root@krava perf]# ldd ./perf | grep python
> libpython3.6m.so.1.0 => /lib64/libpython3.6m.so.1.0 (0x00007f4ca7cc4000)
>
> and get 'Ok result'
>
> [root@krava perf]# ./perf test attr
> 16: Setup struct perf_event_attr : Ok
> 48: Synthesize attr update : Ok
>
>
> [root@krava perf]# python3 --version
> Python 3.6.8
> [root@krava perf]# rpm -qa | grep python3-devel
> python3-devel-3.6.8-1.fc28.x86_64
>
> which Fedora are you on 29? I'm on 28
[acme@quaco ~]$ cat /etc/fedora-release
Fedora release 29 (Twenty Nine)
[acme@quaco tumbleweed]$ rpm -qa | grep python3 | wc -l
96
[acme@quaco tumbleweed]$ rpm -q python3-devel
python3-devel-3.7.2-4.fc29.x86_64
[acme@quaco tumbleweed]$
But it is a SyntaxError, so something simpler, looking up...
- Arnaldo
> jirka
>
> > [root@quaco ~]# find
> >
> > Reverting back to building with python2-devel makes it work:
> >
> > make O=/tmp/build/perf -C tools/perf install-bin
> >
> > [acme@quaco perf]$ ldd ~/bin/perf | grep python
> > libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00007fe283792000)
> > [acme@quaco perf]$
> >
> > [root@quaco ~]# perf test perf_event_attr
> > 16: Setup struct perf_event_attr : Ok
> > [root@quaco ~]#
> >
> > - Arnaldo
--
- Arnaldo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: perf: python3 + tests attr.py failing
2019-02-05 13:02 ` Arnaldo Carvalho de Melo
@ 2019-02-05 13:08 ` Arnaldo Carvalho de Melo
2019-02-05 13:28 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-02-05 13:08 UTC (permalink / raw)
To: Jiri Olsa
Cc: Jiri Olsa, Namhyung Kim, Adrian Hunter, Tony Jones,
Ravi Bangoria, Seeteena Thoufeek, Linux Kernel Mailing List
Em Tue, Feb 05, 2019 at 10:02:14AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Feb 04, 2019 at 09:37:38PM +0100, Jiri Olsa escreveu:
> > On Mon, Feb 04, 2019 at 12:10:42PM -0300, Arnaldo Carvalho de Melo wrote:
> > > Noticed this now when building with PYTHON=python3, can you take a look?
> > > For now I'm reinstalling python2-devel and building with it, i.e.
> > > removing that PYTHON=python3 make command line variable.
> > which Fedora are you on 29? I'm on 28
> [acme@quaco ~]$ cat /etc/fedora-release
> Fedora release 29 (Twenty Nine)
> [acme@quaco tumbleweed]$ rpm -qa | grep python3 | wc -l
> 96
> [acme@quaco tumbleweed]$ rpm -q python3-devel
> python3-devel-3.7.2-4.fc29.x86_64
> [acme@quaco tumbleweed]$
>
> But it is a SyntaxError, so something simpler, looking up...
So python 3 needs to have that as:
except Unsup as obj:
How to make this work with both is what I'm trying to figure out now...
> - Arnaldo
>
> > jirka
> >
> > > [root@quaco ~]# find
> > >
> > > Reverting back to building with python2-devel makes it work:
> > >
> > > make O=/tmp/build/perf -C tools/perf install-bin
> > >
> > > [acme@quaco perf]$ ldd ~/bin/perf | grep python
> > > libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00007fe283792000)
> > > [acme@quaco perf]$
> > >
> > > [root@quaco ~]# perf test perf_event_attr
> > > 16: Setup struct perf_event_attr : Ok
> > > [root@quaco ~]#
> > >
> > > - Arnaldo
>
> --
>
> - Arnaldo
--
- Arnaldo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: perf: python3 + tests attr.py failing
2019-02-05 13:08 ` Arnaldo Carvalho de Melo
@ 2019-02-05 13:28 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-02-05 13:28 UTC (permalink / raw)
To: Jiri Olsa
Cc: Jiri Olsa, Namhyung Kim, Adrian Hunter, Tony Jones,
Ravi Bangoria, Seeteena Thoufeek, Linux Kernel Mailing List
Em Tue, Feb 05, 2019 at 10:08:43AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Feb 05, 2019 at 10:02:14AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Mon, Feb 04, 2019 at 09:37:38PM +0100, Jiri Olsa escreveu:
> > > On Mon, Feb 04, 2019 at 12:10:42PM -0300, Arnaldo Carvalho de Melo wrote:
> > > > Noticed this now when building with PYTHON=python3, can you take a look?
> > > > For now I'm reinstalling python2-devel and building with it, i.e.
> > > > removing that PYTHON=python3 make command line variable.
> > > which Fedora are you on 29? I'm on 28
>
> > [acme@quaco ~]$ cat /etc/fedora-release
> > Fedora release 29 (Twenty Nine)
>
> > [acme@quaco tumbleweed]$ rpm -qa | grep python3 | wc -l
> > 96
> > [acme@quaco tumbleweed]$ rpm -q python3-devel
> > python3-devel-3.7.2-4.fc29.x86_64
> > [acme@quaco tumbleweed]$
> >
> > But it is a SyntaxError, so something simpler, looking up...
>
> So python 3 needs to have that as:
>
> except Unsup as obj:
>
> How to make this work with both is what I'm trying to figure out now...
So, all this is fixed in perf/core already by:
commit 35ea7e4bbb89ecd32057f5f6a2a8feb0d7224e51
Author: Tony Jones <tonyj@suse.de>
Date: Wed Jan 23 16:52:29 2019 -0800
perf script python: Add Python3 support to tests/attr.py
Support both Python 2 and Python 3 in tests/attr.py
The use of "except as" syntax implies the minimum supported Python2 version is
now v2.6
------------------
So nevermind, sorry for the noise :-)
- Arnaldo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: perf: python3 + tests attr.py failing
2019-02-04 20:37 ` Jiri Olsa
2019-02-05 13:02 ` Arnaldo Carvalho de Melo
@ 2019-02-05 13:49 ` Arnaldo Carvalho de Melo
2019-02-05 15:43 ` Jiri Olsa
1 sibling, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-02-05 13:49 UTC (permalink / raw)
To: Jiri Olsa
Cc: Jiri Olsa, Namhyung Kim, Adrian Hunter, Tony Jones,
Ravi Bangoria, Seeteena Thoufeek, Linux Kernel Mailing List
Em Mon, Feb 04, 2019 at 09:37:38PM +0100, Jiri Olsa escreveu:
> On Mon, Feb 04, 2019 at 12:10:42PM -0300, Arnaldo Carvalho de Melo wrote:
> > Noticed this now when building with PYTHON=python3, can you take a look?
> > For now I'm reinstalling python2-devel and building with it, i.e.
> > removing that PYTHON=python3 make command line variable.
> >
> > [root@quaco ~]# perf test -v perf_event_attr
> > 16: Setup struct perf_event_attr :
> > --- start ---
> > test child forked, pid 23937
> > File "/home/acme/libexec/perf-core/tests/attr.py", line 325
> > except Unsup, obj:
> > ^
> > SyntaxError: invalid syntax
> > test child finished with -1
> > ---- end ----
> > Setup struct perf_event_attr: FAILED!
>
> hum, I built the same way like you 'make PYTHON=python3'
> [root@krava perf]# ldd ./perf | grep python
> libpython3.6m.so.1.0 => /lib64/libpython3.6m.so.1.0 (0x00007f4ca7cc4000)
>
> and get 'Ok result'
>
> [root@krava perf]# ./perf test attr
> 16: Setup struct perf_event_attr : Ok
> 48: Synthesize attr update : Ok
>
>
> [root@krava perf]# python3 --version
> Python 3.6.8
> [root@krava perf]# rpm -qa | grep python3-devel
> python3-devel-3.6.8-1.fc28.x86_64
>
> which Fedora are you on 29? I'm on 28
I think you tested perf/core, that has Tony's fix to make 'perf test perf_event_attr'
work with both python2 and python3, right?
While I was having that failure with perf/urgent.
I just cherry-picked:
commit 35ea7e4bbb89ecd32057f5f6a2a8feb0d7224e51
Author: Tony Jones <tonyj@suse.de>
Date: Wed Jan 23 16:52:29 2019 -0800
perf script python: Add Python3 support to tests/attr.py
----------------------
And now my perf/urgent branch passes that 'perf test' entry with both
python2 and 3.
- Arnaldo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: perf: python3 + tests attr.py failing
2019-02-05 13:49 ` Arnaldo Carvalho de Melo
@ 2019-02-05 15:43 ` Jiri Olsa
0 siblings, 0 replies; 7+ messages in thread
From: Jiri Olsa @ 2019-02-05 15:43 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Jiri Olsa, Namhyung Kim, Adrian Hunter, Tony Jones,
Ravi Bangoria, Seeteena Thoufeek, Linux Kernel Mailing List
On Tue, Feb 05, 2019 at 10:49:35AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Mon, Feb 04, 2019 at 09:37:38PM +0100, Jiri Olsa escreveu:
> > On Mon, Feb 04, 2019 at 12:10:42PM -0300, Arnaldo Carvalho de Melo wrote:
> > > Noticed this now when building with PYTHON=python3, can you take a look?
> > > For now I'm reinstalling python2-devel and building with it, i.e.
> > > removing that PYTHON=python3 make command line variable.
> > >
> > > [root@quaco ~]# perf test -v perf_event_attr
> > > 16: Setup struct perf_event_attr :
> > > --- start ---
> > > test child forked, pid 23937
> > > File "/home/acme/libexec/perf-core/tests/attr.py", line 325
> > > except Unsup, obj:
> > > ^
> > > SyntaxError: invalid syntax
> > > test child finished with -1
> > > ---- end ----
> > > Setup struct perf_event_attr: FAILED!
> >
> > hum, I built the same way like you 'make PYTHON=python3'
> > [root@krava perf]# ldd ./perf | grep python
> > libpython3.6m.so.1.0 => /lib64/libpython3.6m.so.1.0 (0x00007f4ca7cc4000)
> >
> > and get 'Ok result'
> >
> > [root@krava perf]# ./perf test attr
> > 16: Setup struct perf_event_attr : Ok
> > 48: Synthesize attr update : Ok
> >
> >
> > [root@krava perf]# python3 --version
> > Python 3.6.8
> > [root@krava perf]# rpm -qa | grep python3-devel
> > python3-devel-3.6.8-1.fc28.x86_64
> >
> > which Fedora are you on 29? I'm on 28
>
> I think you tested perf/core, that has Tony's fix to make 'perf test perf_event_attr'
> work with both python2 and python3, right?
>
> While I was having that failure with perf/urgent.
>
> I just cherry-picked:
>
> commit 35ea7e4bbb89ecd32057f5f6a2a8feb0d7224e51
> Author: Tony Jones <tonyj@suse.de>
> Date: Wed Jan 23 16:52:29 2019 -0800
>
> perf script python: Add Python3 support to tests/attr.py
right, i was over latest perf/core
jirka
>
>
> ----------------------
>
> And now my perf/urgent branch passes that 'perf test' entry with both
> python2 and 3.
>
> - Arnaldo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-02-05 15:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04 15:10 perf: python3 + tests attr.py failing Arnaldo Carvalho de Melo
2019-02-04 20:37 ` Jiri Olsa
2019-02-05 13:02 ` Arnaldo Carvalho de Melo
2019-02-05 13:08 ` Arnaldo Carvalho de Melo
2019-02-05 13:28 ` Arnaldo Carvalho de Melo
2019-02-05 13:49 ` Arnaldo Carvalho de Melo
2019-02-05 15:43 ` Jiri Olsa
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).