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: use replace error handler #1888

Merged
merged 1 commit into from
Jul 19, 2018

Conversation

jeromemarchand
Copy link
Contributor

@jeromemarchand jeromemarchand commented Jul 16, 2018

Prevents the following error when tracing a java program that contains
non-ascii method name:

Traceback (most recent call last):
  File "/usr/share/bcc/tools/lib/ucalls", line 305, in <module>
    data = get_data()   # [(function, (num calls, latency in ns))]
  File "/usr/share/bcc/tools/lib/ucalls", line 266, in get_data
    bpf["counts"].items()))
  File "/usr/share/bcc/tools/lib/ucalls", line 264, in <lambda>
    kv[0].method.decode(),
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 11: ordinal not in range(128)

Signed-off-by: Jerome Marchand jmarchan@redhat.com

Prevents the following error when tracing a java program that contains
non-ascii method name:

Traceback (most recent call last):
  File "/usr/share/bcc/tools/lib/ucalls", line 305, in <module>
    data = get_data()   # [(function, (num calls, latency in ns))]
  File "/usr/share/bcc/tools/lib/ucalls", line 266, in get_data
    bpf["counts"].items()))
  File "/usr/share/bcc/tools/lib/ucalls", line 264, in <lambda>
    kv[0].method.decode(),
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 11: ordinal not in range(128)

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
@yonghong-song
Copy link
Collaborator

[buildbot, ok to test]

@yonghong-song yonghong-song merged commit 4e4c9e0 into iovisor:master Jul 19, 2018
@jeromemarchand jeromemarchand deleted the ucalls_unicode branch August 5, 2019 16:02
CrackerCat pushed a commit to CrackerCat/bcc that referenced this pull request Jul 31, 2024
Prevents the following error when tracing a java program that contains
non-ascii method name:

Traceback (most recent call last):
  File "/usr/share/bcc/tools/lib/ucalls", line 305, in <module>
    data = get_data()   # [(function, (num calls, latency in ns))]
  File "/usr/share/bcc/tools/lib/ucalls", line 266, in get_data
    bpf["counts"].items()))
  File "/usr/share/bcc/tools/lib/ucalls", line 264, in <lambda>
    kv[0].method.decode(),
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 11: ordinal not in range(128)

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
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