Python 3 compatibility fixes around string handling (#986)
authorRafael F <r4f4rfs@gmail.com>
Sun, 26 Mar 2017 12:54:25 +0000 (14:54 +0200)
committerSasha Goldshtein <goldshtn@gmail.com>
Sun, 26 Mar 2017 12:54:25 +0000 (15:54 +0300)
commit78948e4aae6aa0d06806d452d193320936d59dc7
tree3350360064956d4826ea89b7c2597ac5ce027734
parent6bbf49c0429f221d3e99309b96eb3a2f2b27b024
Python 3 compatibility fixes around string handling (#986)

This fixes the bcc module and all the affected tools for issues related to string handling in Python 3. Specifically, when passing Python strings to C libraries they are encoded as ASCII, and when constructing Python strings from C strings, they are decoded first.
34 files changed:
src/python/bcc/__init__.py
src/python/bcc/usdt.py
tools/bashreadline.py
tools/biosnoop.py
tools/biotop.py
tools/bitesize.py
tools/btrfsslower.py
tools/cachetop.py
tools/capable.py
tools/dcsnoop.py
tools/ext4dist.py
tools/ext4slower.py
tools/filelife.py
tools/fileslower.py
tools/gethostlatency.py
tools/hardirqs.py
tools/killsnoop.py
tools/mdflush.py
tools/offcputime.py
tools/offwaketime.py
tools/oomkill.py
tools/opensnoop.py
tools/profile.py
tools/slabratetop.py
tools/sslsniff.py
tools/stacksnoop.py
tools/statsnoop.py
tools/tcpaccept.py
tools/tcpconnect.py
tools/tcpconnlat.py
tools/tcplife.py
tools/trace.py
tools/ttysnoop.py
tools/wakeuptime.py