mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
perf evsel: Precalculate the sample size
So that we don't have to store it in the perf_session instance, because in the future perf_session instances may have multiple evlists, each with different sample_type/sizes. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-ptod86fxkpgq3h62m9refkv4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
0ecf4f0c02
commit
bde09467b5
6 changed files with 24 additions and 25 deletions
|
@ -806,7 +806,7 @@ static PyObject *pyrf_evlist__read_on_cpu(struct pyrf_evlist *pevlist,
|
|||
|
||||
first = list_entry(evlist->entries.next, struct perf_evsel, node);
|
||||
err = perf_event__parse_sample(event, first->attr.sample_type,
|
||||
perf_evsel__sample_size(first),
|
||||
first->sample_size,
|
||||
sample_id_all, &pevent->sample, false);
|
||||
if (err)
|
||||
return PyErr_Format(PyExc_OSError,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue