Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools/funcslower: fix printing of folded stacks
When trying to print folded stack, funcslower tries to join bytes to a string. Let's perform that operation with bytes only, and decode before printing. Also, decode symbols name before printing for the default stack format, to avoid unsightly b'xxx' output. It fixes the following error: Exception ignored on calling ctypes callback function: <function PerfEventArray._open_perf_buffer.<locals>.raw_cb_ at 0x7f200541e5e0> Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/bcc/table.py", line 982, in raw_cb_ callback(cpu, data, size) File "/usr/share/bcc/tools/funcslower", line 340, in print_event print_stack(event) File "/usr/share/bcc/tools/funcslower", line 324, in print_stack print("%s %d" % (";".join(line), 1)) TypeError: sequence item 1: expected str instance, bytes found Signed-off-by: Jerome Marchand <[email protected]>
- Loading branch information