diff options
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
-rw-r--r-- | tools/perf/util/scripting-engines/trace-event-python.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c index 315905c748fa..7059d1be2d09 100644 --- a/tools/perf/util/scripting-engines/trace-event-python.c +++ b/tools/perf/util/scripting-engines/trace-event-python.c | |||
@@ -733,8 +733,7 @@ static PyObject *get_perf_sample_dict(struct perf_sample *sample, | |||
733 | Py_FatalError("couldn't create Python dictionary"); | 733 | Py_FatalError("couldn't create Python dictionary"); |
734 | 734 | ||
735 | pydict_set_item_string_decref(dict, "ev_name", _PyUnicode_FromString(perf_evsel__name(evsel))); | 735 | pydict_set_item_string_decref(dict, "ev_name", _PyUnicode_FromString(perf_evsel__name(evsel))); |
736 | pydict_set_item_string_decref(dict, "attr", _PyUnicode_FromStringAndSize( | 736 | pydict_set_item_string_decref(dict, "attr", _PyBytes_FromStringAndSize((const char *)&evsel->attr, sizeof(evsel->attr))); |
737 | (const char *)&evsel->attr, sizeof(evsel->attr))); | ||
738 | 737 | ||
739 | pydict_set_item_string_decref(dict_sample, "pid", | 738 | pydict_set_item_string_decref(dict_sample, "pid", |
740 | _PyLong_FromLong(sample->pid)); | 739 | _PyLong_FromLong(sample->pid)); |