Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ucalls: convert bytes to str #1489

Merged
merged 1 commit into from
Dec 22, 2017
Merged

Conversation

r4f4
Copy link
Contributor

@r4f4 r4f4 commented Dec 15, 2017

This fixes the following error with python3

Tracing calls in process 2577 (language: python)... Ctrl-C to quit.
^C
Traceback (most recent call last):
File "/usr/share/bcc/tools/lib/ucalls", line 303, in
data = get_data() # [(function, (num calls, latency in ns))]
File "/usr/share/bcc/tools/lib/ucalls", line 264, in get_data
bpf["counts"].items()))
File "/usr/share/bcc/tools/lib/ucalls", line 262, in
data = list(map(lambda kv: (kv[0].clazz + "." + kv[0].method,
TypeError: can't concat str to bytes

Signed-off-by: Rafael Fonseca [email protected]

This fixes the following error with python3

Tracing calls in process 2577 (language: python)... Ctrl-C to quit.
^C
Traceback (most recent call last):
  File "/usr/share/bcc/tools/lib/ucalls", line 303, in <module>
    data = get_data()   # [(function, (num calls, latency in ns))]
  File "/usr/share/bcc/tools/lib/ucalls", line 264, in get_data
    bpf["counts"].items()))
  File "/usr/share/bcc/tools/lib/ucalls", line 262, in <lambda>
    data = list(map(lambda kv: (kv[0].clazz + "." + kv[0].method,
TypeError: can't concat str to bytes

Signed-off-by: Rafael Fonseca <[email protected]>
@yonghong-song
Copy link
Collaborator

Another python3 decode() related issue. LGTM, but cc @drzaeus77 to see whether we have a broader strategy to address the issue.

@yonghong-song yonghong-song merged commit 4e04c94 into iovisor:master Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants