lkml.org 
[lkml]   [2019]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] perf scripts python: Add Python 3 support to check-perf-trace.py
On Thu, Jan 17, 2019 at 03:15:28PM +0530, Seeteena Thoufeek wrote:
> Support both Python 2 and Python 3 in check-perf-trace.py.
> ``print`` is now a function rather than a statement. This should have
> no functional change.
>
> Fix indentation issue, replace spaces with tab
>
> Signed-off-by: Seeteena Thoufeek <s1seetee@linux.vnet.ibm.com>
> Reviewed-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>

hum, could you please add some info about testing those changes?
(or even some global into 0/.. patch)

this is working for me on python2:

[root@krava perf]# perf script rec check-perf-trace
^C
[root@krava perf]# perf script -s scripts/python/check-perf-trace.py
trace_begin

unhandled events:


event count

---------------------------------------- -----------

raw_syscalls__sys_enter 3509879


but fails for python3:

[root@ibm-x3650m4-01-vm-04 perf]# perf script rec check-perf-trace
^C[ perf record: Woken up 0 times to write data ]
Warning:
1 out of order events recorded.
[ perf record: Captured and wrote 43.132 MB perf.data (490171 samples) ]

[root@ibm-x3650m4-01-vm-04 perf]# perf script -s scripts/python/check-perf-trace.py
Traceback (most recent call last):
File "scripts/python/check-perf-trace.py", line 18, in <module>
from perf_trace_context import *
ModuleNotFoundError: No module named 'perf_trace_context'
Error running python script scripts/python/check-perf-trace.py

I did not test with rpm, just did 'make install' for perf

thanks,
jirka

\
 
 \ /
  Last update: 2019-01-17 13:32    [W:0.163 / U:15.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site