libperf: Move 'nr_mmaps' from 'struct evlist' to 'struct perf_evlist'
Moving 'nr_mmaps' from 'struct evlist' to 'struct perf_evlist', it will be used in following patches. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lore.kernel.org/lkml/20190913132355.21634-21-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
648b5af3f3
commit
c976ee11a0
@@ -33,7 +33,7 @@ static int count_samples(struct evlist *evlist, int *sample_count,
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < evlist->nr_mmaps; i++) {
|
||||
for (i = 0; i < evlist->core.nr_mmaps; i++) {
|
||||
struct mmap *map = &evlist->overwrite_mmap[i];
|
||||
union perf_event *event;
|
||||
|
||||
|
@@ -179,7 +179,7 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
|
||||
(*func)();
|
||||
evlist__disable(evlist);
|
||||
|
||||
for (i = 0; i < evlist->nr_mmaps; i++) {
|
||||
for (i = 0; i < evlist->core.nr_mmaps; i++) {
|
||||
union perf_event *event;
|
||||
struct mmap *md;
|
||||
|
||||
|
@@ -423,7 +423,7 @@ static int process_events(struct machine *machine, struct evlist *evlist,
|
||||
struct mmap *md;
|
||||
int i, ret;
|
||||
|
||||
for (i = 0; i < evlist->nr_mmaps; i++) {
|
||||
for (i = 0; i < evlist->core.nr_mmaps; i++) {
|
||||
md = &evlist->mmap[i];
|
||||
if (perf_mmap__read_init(md) < 0)
|
||||
continue;
|
||||
|
@@ -36,7 +36,7 @@ static int find_comm(struct evlist *evlist, const char *comm)
|
||||
int i, found;
|
||||
|
||||
found = 0;
|
||||
for (i = 0; i < evlist->nr_mmaps; i++) {
|
||||
for (i = 0; i < evlist->core.nr_mmaps; i++) {
|
||||
md = &evlist->mmap[i];
|
||||
if (perf_mmap__read_init(md) < 0)
|
||||
continue;
|
||||
|
@@ -87,7 +87,7 @@ int test__syscall_openat_tp_fields(struct test *test __maybe_unused, int subtest
|
||||
while (1) {
|
||||
int before = nr_events;
|
||||
|
||||
for (i = 0; i < evlist->nr_mmaps; i++) {
|
||||
for (i = 0; i < evlist->core.nr_mmaps; i++) {
|
||||
union perf_event *event;
|
||||
struct mmap *md;
|
||||
|
||||
|
@@ -165,7 +165,7 @@ int test__PERF_RECORD(struct test *test __maybe_unused, int subtest __maybe_unus
|
||||
while (1) {
|
||||
int before = total_events;
|
||||
|
||||
for (i = 0; i < evlist->nr_mmaps; i++) {
|
||||
for (i = 0; i < evlist->core.nr_mmaps; i++) {
|
||||
union perf_event *event;
|
||||
struct mmap *md;
|
||||
|
||||
|
@@ -267,7 +267,7 @@ static int process_events(struct evlist *evlist,
|
||||
struct mmap *md;
|
||||
int i, ret;
|
||||
|
||||
for (i = 0; i < evlist->nr_mmaps; i++) {
|
||||
for (i = 0; i < evlist->core.nr_mmaps; i++) {
|
||||
md = &evlist->mmap[i];
|
||||
if (perf_mmap__read_init(md) < 0)
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user