Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf tests: Rename thread-mg-share to thread-maps-share

One more step in merging '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-naxsl3g4ou3fyxb8l8e0pn5e@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+15 -15
+1 -1
tools/perf/tests/Build
··· 27 27 perf-y += task-exit.o 28 28 perf-y += sw-clock.o 29 29 perf-y += mmap-thread-lookup.o 30 - perf-y += thread-mg-share.o 30 + perf-y += thread-maps-share.o 31 31 perf-y += switch-tracking.o 32 32 perf-y += keep-tracking.o 33 33 perf-y += code-reading.o
+2 -2
tools/perf/tests/builtin-test.c
··· 166 166 .func = test__mmap_thread_lookup, 167 167 }, 168 168 { 169 - .desc = "Share thread mg", 170 - .func = test__thread_mg_share, 169 + .desc = "Share thread maps", 170 + .func = test__thread_maps_share, 171 171 }, 172 172 { 173 173 .desc = "Sort output of hist entries",
+1 -1
tools/perf/tests/tests.h
··· 73 73 int test__expr(struct test *test, int subtest); 74 74 int test__hists_filter(struct test *test, int subtest); 75 75 int test__mmap_thread_lookup(struct test *test, int subtest); 76 - int test__thread_mg_share(struct test *test, int subtest); 76 + int test__thread_maps_share(struct test *test, int subtest); 77 77 int test__hists_output(struct test *test, int subtest); 78 78 int test__hists_cumulate(struct test *test, int subtest); 79 79 int test__switch_tracking(struct test *test, int subtest);
+11 -11
tools/perf/tests/thread-mg-share.c tools/perf/tests/thread-maps-share.c
··· 4 4 #include "thread.h" 5 5 #include "debug.h" 6 6 7 - int test__thread_mg_share(struct test *test __maybe_unused, int subtest __maybe_unused) 7 + int test__thread_maps_share(struct test *test __maybe_unused, int subtest __maybe_unused) 8 8 { 9 9 struct machines machines; 10 10 struct machine *machine; ··· 16 16 17 17 /* other process */ 18 18 struct thread *other, *other_leader; 19 - struct maps *other_mg; 19 + struct maps *other_maps; 20 20 21 21 /* 22 22 * This test create 2 processes abstractions (struct thread) ··· 45 45 maps = leader->maps; 46 46 TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&maps->refcnt), 4); 47 47 48 - /* test the map groups pointer is shared */ 49 - TEST_ASSERT_VAL("map groups don't match", maps == t1->maps); 50 - TEST_ASSERT_VAL("map groups don't match", maps == t2->maps); 51 - TEST_ASSERT_VAL("map groups don't match", maps == t3->maps); 48 + /* test the maps pointer is shared */ 49 + TEST_ASSERT_VAL("maps don't match", maps == t1->maps); 50 + TEST_ASSERT_VAL("maps don't match", maps == t2->maps); 51 + TEST_ASSERT_VAL("maps don't match", maps == t3->maps); 52 52 53 53 /* 54 54 * Verify the other leader was created by previous call. 55 - * It should have shared map groups with no change in 55 + * It should have shared maps with no change in 56 56 * refcnt. 57 57 */ 58 58 other_leader = machine__find_thread(machine, 4, 4); ··· 70 70 machine__remove_thread(machine, other); 71 71 machine__remove_thread(machine, other_leader); 72 72 73 - other_mg = other->maps; 74 - TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&other_mg->refcnt), 2); 73 + other_maps = other->maps; 74 + TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&other_maps->refcnt), 2); 75 75 76 - TEST_ASSERT_VAL("map groups don't match", other_mg == other_leader->maps); 76 + TEST_ASSERT_VAL("maps don't match", other_maps == other_leader->maps); 77 77 78 78 /* release thread group */ 79 79 thread__put(leader); ··· 89 89 90 90 /* release other group */ 91 91 thread__put(other_leader); 92 - TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&other_mg->refcnt), 1); 92 + TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&other_maps->refcnt), 1); 93 93 94 94 thread__put(other); 95 95