• Eduardo Habkost's avatar
    simpletrace: Convert name from mapping record to str · 749c1d8e
    Eduardo Habkost authored
    The rest of the code assumes that idtoname is a (int -> str)
    dictionary, so convert the data accordingly.
    This is necessary to make the script work with Python 3 (where
    reads from a binary file return 'bytes' objects, not 'str').
    Fixes the following error:
      $ python3 ./scripts/simpletrace.py trace-events-all trace-27445
      b'object_class_dynamic_cast_assert' event is logged but is not \
      declared in the trace events file, try using trace-events-all instead.
    Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
    Message-id: 20180619194549.15584-1-ehabkost@redhat.com
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>