Skip to content

Commit fe87797

Browse files
committed
perf thread: Rename thread->mg to thread->maps
One more step on 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-69vcr8pubpym90skxhmbwhiw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 79b6bb7 commit fe87797

19 files changed

Lines changed: 49 additions & 49 deletions

‎tools/perf/arch/arm/tests/dwarf-unwind.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static int sample_ustack(struct perf_sample *sample,
2626

2727
sp = (unsigned long) regs[PERF_REG_ARM_SP];
2828

29-
map = maps__find(thread->mg, (u64)sp);
29+
map = maps__find(thread->maps, (u64)sp);
3030
if (!map) {
3131
pr_debug("failed to get stack map\n");
3232
free(buf);

‎tools/perf/arch/arm64/tests/dwarf-unwind.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static int sample_ustack(struct perf_sample *sample,
2626

2727
sp = (unsigned long) regs[PERF_REG_ARM64_SP];
2828

29-
map = maps__find(thread->mg, (u64)sp);
29+
map = maps__find(thread->maps, (u64)sp);
3030
if (!map) {
3131
pr_debug("failed to get stack map\n");
3232
free(buf);

‎tools/perf/arch/powerpc/tests/dwarf-unwind.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static int sample_ustack(struct perf_sample *sample,
2727

2828
sp = (unsigned long) regs[PERF_REG_POWERPC_R1];
2929

30-
map = maps__find(thread->mg, (u64)sp);
30+
map = maps__find(thread->maps, (u64)sp);
3131
if (!map) {
3232
pr_debug("failed to get stack map\n");
3333
free(buf);

‎tools/perf/arch/x86/tests/dwarf-unwind.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static int sample_ustack(struct perf_sample *sample,
2727

2828
sp = (unsigned long) regs[PERF_REG_X86_SP];
2929

30-
map = maps__find(thread->mg, (u64)sp);
30+
map = maps__find(thread->maps, (u64)sp);
3131
if (!map) {
3232
pr_debug("failed to get stack map\n");
3333
free(buf);

‎tools/perf/builtin-report.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ static void task__print_level(struct task *task, FILE *fp, int level)
790790

791791
fprintf(fp, "%s\n", thread__comm_str(thread));
792792

793-
maps__fprintf_task(thread->mg, comm_indent, fp);
793+
maps__fprintf_task(thread->maps, comm_indent, fp);
794794

795795
if (!list_empty(&task->children)) {
796796
list_for_each_entry(child, &task->children, list)

‎tools/perf/tests/code-reading.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ static int read_object_code(u64 addr, size_t len, u8 cpumode,
276276
len = al.map->end - addr;
277277

278278
/* Read the object code using perf */
279-
ret_len = dso__data_read_offset(al.map->dso, thread->mg->machine,
279+
ret_len = dso__data_read_offset(al.map->dso, thread->maps->machine,
280280
al.addr, buf1, len);
281281
if (ret_len != len) {
282282
pr_debug("dso__data_read_offset failed\n");

‎tools/perf/tests/thread-mg-share.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ int test__thread_mg_share(struct test *test __maybe_unused, int subtest __maybe_
4242
TEST_ASSERT_VAL("failed to create threads",
4343
leader && t1 && t2 && t3 && other);
4444

45-
mg = leader->mg;
45+
mg = leader->maps;
4646
TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&mg->refcnt), 4);
4747

4848
/* test the map groups pointer is shared */
49-
TEST_ASSERT_VAL("map groups don't match", mg == t1->mg);
50-
TEST_ASSERT_VAL("map groups don't match", mg == t2->mg);
51-
TEST_ASSERT_VAL("map groups don't match", mg == t3->mg);
49+
TEST_ASSERT_VAL("map groups don't match", mg == t1->maps);
50+
TEST_ASSERT_VAL("map groups don't match", mg == t2->maps);
51+
TEST_ASSERT_VAL("map groups don't match", mg == t3->maps);
5252

5353
/*
5454
* Verify the other leader was created by previous call.
@@ -70,10 +70,10 @@ int test__thread_mg_share(struct test *test __maybe_unused, int subtest __maybe_
7070
machine__remove_thread(machine, other);
7171
machine__remove_thread(machine, other_leader);
7272

73-
other_mg = other->mg;
73+
other_mg = other->maps;
7474
TEST_ASSERT_EQUAL("wrong refcnt", refcount_read(&other_mg->refcnt), 2);
7575

76-
TEST_ASSERT_VAL("map groups don't match", other_mg == other_leader->mg);
76+
TEST_ASSERT_VAL("map groups don't match", other_mg == other_leader->maps);
7777

7878
/* release thread group */
7979
thread__put(leader);

‎tools/perf/ui/stdio/hist.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
885885
}
886886

887887
if (h->ms.map == NULL && verbose > 1) {
888-
maps__fprintf(h->thread->mg, fp);
888+
maps__fprintf(h->thread->maps, fp);
889889
fprintf(fp, "%.10s end\n", graph_dotted_line);
890890
}
891891
}

‎tools/perf/util/db-export.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ static struct call_path *call_path_from_sample(struct db_export *dbe,
251251
*/
252252
al.sym = node->ms.sym;
253253
al.map = node->ms.map;
254-
al.mg = thread->mg;
254+
al.mg = thread->maps;
255255
al.addr = node->ip;
256256

257257
if (al.map && !al.sym)

‎tools/perf/util/event.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ int perf_event__process(struct perf_tool *tool __maybe_unused,
457457
struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
458458
struct addr_location *al)
459459
{
460-
struct maps *mg = thread->mg;
460+
struct maps *mg = thread->maps;
461461
struct machine *machine = mg->machine;
462462
bool load_map = false;
463463

@@ -523,7 +523,7 @@ struct map *thread__find_map_fb(struct thread *thread, u8 cpumode, u64 addr,
523523
struct addr_location *al)
524524
{
525525
struct map *map = thread__find_map(thread, cpumode, addr, al);
526-
struct machine *machine = thread->mg->machine;
526+
struct machine *machine = thread->maps->machine;
527527
u8 addr_cpumode = machine__addr_cpumode(machine, cpumode, addr);
528528

529529
if (map || addr_cpumode == cpumode)

0 commit comments

Comments
 (0)