aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/python.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/python.c')
-rw-r--r--tools/perf/util/python.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index e03b58a48424..0688bfb6d280 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -797,17 +797,13 @@ static PyObject *pyrf_evlist__read_on_cpu(struct pyrf_evlist *pevlist,
797 797
798 event = perf_evlist__mmap_read(evlist, cpu); 798 event = perf_evlist__mmap_read(evlist, cpu);
799 if (event != NULL) { 799 if (event != NULL) {
800 struct perf_evsel *first;
801 PyObject *pyevent = pyrf_event__new(event); 800 PyObject *pyevent = pyrf_event__new(event);
802 struct pyrf_event *pevent = (struct pyrf_event *)pyevent; 801 struct pyrf_event *pevent = (struct pyrf_event *)pyevent;
803 802
804 if (pyevent == NULL) 803 if (pyevent == NULL)
805 return PyErr_NoMemory(); 804 return PyErr_NoMemory();
806 805
807 first = list_entry(evlist->entries.next, struct perf_evsel, node); 806 err = perf_evlist__parse_sample(evlist, event, &pevent->sample, false);
808 err = perf_event__parse_sample(event, first->attr.sample_type,
809 perf_evsel__sample_size(first),
810 sample_id_all, &pevent->sample, false);
811 if (err) 807 if (err)
812 return PyErr_Format(PyExc_OSError, 808 return PyErr_Format(PyExc_OSError,
813 "perf: can't parse sample, err=%d", err); 809 "perf: can't parse sample, err=%d", err);