mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-19 13:22:03 +00:00
libperf: Add nr_entries to struct perf_evlist
Move nr_entries count from 'struct perf' to into perf_evlist struct. Committer notes: Fix tools/perf/arch/s390/util/auxtrace.c case. And also the comment in tools/perf/util/annotate.h. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexey Budankov <alexey.budankov@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20190721112506.12306-42-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
52e22fb8af
commit
6484d2f9dc
20 changed files with 83 additions and 80 deletions
|
@ -973,10 +973,10 @@ static PyObject *pyrf_evlist__add(struct pyrf_evlist *pevlist,
|
|||
|
||||
Py_INCREF(pevsel);
|
||||
evsel = &((struct pyrf_evsel *)pevsel)->evsel;
|
||||
evsel->idx = evlist->nr_entries;
|
||||
evsel->idx = evlist->core.nr_entries;
|
||||
evlist__add(evlist, evsel);
|
||||
|
||||
return Py_BuildValue("i", evlist->nr_entries);
|
||||
return Py_BuildValue("i", evlist->core.nr_entries);
|
||||
}
|
||||
|
||||
static struct perf_mmap *get_md(struct evlist *evlist, int cpu)
|
||||
|
@ -1112,7 +1112,7 @@ static Py_ssize_t pyrf_evlist__length(PyObject *obj)
|
|||
{
|
||||
struct pyrf_evlist *pevlist = (void *)obj;
|
||||
|
||||
return pevlist->evlist.nr_entries;
|
||||
return pevlist->evlist.core.nr_entries;
|
||||
}
|
||||
|
||||
static PyObject *pyrf_evlist__item(PyObject *obj, Py_ssize_t i)
|
||||
|
@ -1120,7 +1120,7 @@ static PyObject *pyrf_evlist__item(PyObject *obj, Py_ssize_t i)
|
|||
struct pyrf_evlist *pevlist = (void *)obj;
|
||||
struct evsel *pos;
|
||||
|
||||
if (i >= pevlist->evlist.nr_entries)
|
||||
if (i >= pevlist->evlist.core.nr_entries)
|
||||
return NULL;
|
||||
|
||||
evlist__for_each_entry(&pevlist->evlist, pos) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue