diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-11-25 22:21:28 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-11-26 11:07:46 -0300 |
commit | 9a29ceee6bb14aeb58ab2222c8e792576fe90fb8 (patch) | |
tree | bdd5fbe623b8e38107e480fd77faef2a3b64ce1c /tools/perf/tests | |
parent | f2eaea09d684177f57db55a9ce2b67d048083fd5 (diff) | |
download | linux-9a29ceee6bb14aeb58ab2222c8e792576fe90fb8.tar.bz2 |
perf maps: Rename 'mg' variables to 'maps'
Continuing the merge of 'struct maps' with 'struct map_groups'.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-z8d14wrw393a0fbvmnk1bqd9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests')
-rw-r--r-- | tools/perf/tests/map_groups.c | 18 | ||||
-rw-r--r-- | tools/perf/tests/thread-mg-share.c | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/tools/perf/tests/map_groups.c b/tools/perf/tests/map_groups.c index db806e5a95c2..9df1d14db40e 100644 --- a/tools/perf/tests/map_groups.c +++ b/tools/perf/tests/map_groups.c @@ -35,7 +35,7 @@ static int check_maps(struct map_def *merged, unsigned int size, struct maps *ma int test__map_groups__merge_in(struct test *t __maybe_unused, int subtest __maybe_unused) { - struct maps mg; + struct maps maps; unsigned int i; struct map_def bpf_progs[] = { { "bpf_prog_1", 200, 300 }, @@ -64,7 +64,7 @@ int test__map_groups__merge_in(struct test *t __maybe_unused, int subtest __mayb struct map *map_kcore1, *map_kcore2, *map_kcore3; int ret; - maps__init(&mg, NULL); + maps__init(&maps, NULL); for (i = 0; i < ARRAY_SIZE(bpf_progs); i++) { struct map *map; @@ -74,7 +74,7 @@ int test__map_groups__merge_in(struct test *t __maybe_unused, int subtest __mayb map->start = bpf_progs[i].start; map->end = bpf_progs[i].end; - maps__insert(&mg, map); + maps__insert(&maps, map); map__put(map); } @@ -99,22 +99,22 @@ int test__map_groups__merge_in(struct test *t __maybe_unused, int subtest __mayb map_kcore3->start = 880; map_kcore3->end = 1100; - ret = maps__merge_in(&mg, map_kcore1); + ret = maps__merge_in(&maps, map_kcore1); TEST_ASSERT_VAL("failed to merge map", !ret); - ret = check_maps(merged12, ARRAY_SIZE(merged12), &mg); + ret = check_maps(merged12, ARRAY_SIZE(merged12), &maps); TEST_ASSERT_VAL("merge check failed", !ret); - ret = maps__merge_in(&mg, map_kcore2); + ret = maps__merge_in(&maps, map_kcore2); TEST_ASSERT_VAL("failed to merge map", !ret); - ret = check_maps(merged12, ARRAY_SIZE(merged12), &mg); + ret = check_maps(merged12, ARRAY_SIZE(merged12), &maps); TEST_ASSERT_VAL("merge check failed", !ret); - ret = maps__merge_in(&mg, map_kcore3); + ret = maps__merge_in(&maps, map_kcore3); TEST_ASSERT_VAL("failed to merge map", !ret); - ret = check_maps(merged3, ARRAY_SIZE(merged3), &mg); + ret = check_maps(merged3, ARRAY_SIZE(merged3), &maps); TEST_ASSERT_VAL("merge check failed", !ret); return TEST_OK; } diff --git a/tools/perf/tests/thread-mg-share.c b/tools/perf/tests/thread-mg-share.c index 6032061958d2..e3b0d692d565 100644 --- a/tools/perf/tests/thread-mg-share.c +++ b/tools/perf/tests/thread-mg-share.c @@ -12,7 +12,7 @@ int test__thread_mg_share(struct test *test __maybe_unused, int subtest __maybe_ /* thread group */ struct thread *leader; struct thread *t1, *t2, *t3; - struct maps *mg; + struct maps *maps; /* other process */ struct thread *other, *other_leader; @@ -42,13 +42,13 @@ int test__thread_mg_share(struct test *test __maybe_unused, int subtest __maybe_ TEST_ASSERT_VAL("failed to create threads", leader && t1 && t2 && t3 && other); - mg = leader->maps; - TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&mg->refcnt), 4); + maps = leader->maps; + TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&maps->refcnt), 4); /* test the map groups pointer is shared */ - TEST_ASSERT_VAL("map groups don't match", mg == t1->maps); - TEST_ASSERT_VAL("map groups don't match", mg == t2->maps); - TEST_ASSERT_VAL("map groups don't match", mg == t3->maps); + TEST_ASSERT_VAL("map groups don't match", maps == t1->maps); + TEST_ASSERT_VAL("map groups don't match", maps == t2->maps); + TEST_ASSERT_VAL("map groups don't match", maps == t3->maps); /* * Verify the other leader was created by previous call. @@ -77,13 +77,13 @@ int test__thread_mg_share(struct test *test __maybe_unused, int subtest __maybe_ /* release thread group */ thread__put(leader); - TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&mg->refcnt), 3); + TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&maps->refcnt), 3); thread__put(t1); - TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&mg->refcnt), 2); + TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&maps->refcnt), 2); thread__put(t2); - TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&mg->refcnt), 1); + TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&maps->refcnt), 1); thread__put(t3); |