Commit 694520df authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo
Browse files

perf addr_location: Rename al->mg to al->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-foo95pyyp3bhocbt7yd8qrvq@git.kernel.org


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent fe87797d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1106,7 +1106,7 @@ int hist_entry__append_callchain(struct hist_entry *he, struct perf_sample *samp
int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *node,
			bool hide_unresolved)
{
	al->mg	= node->ms.mg;
	al->maps = node->ms.mg;
	al->map = node->ms.map;
	al->sym = node->ms.sym;
	al->srcline = node->srcline;
@@ -1119,8 +1119,8 @@ int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *
			goto out;
	}

	if (al->mg == &al->mg->machine->kmaps) {
		if (machine__is_host(al->mg->machine)) {
	if (al->maps == &al->maps->machine->kmaps) {
		if (machine__is_host(al->maps->machine)) {
			al->cpumode = PERF_RECORD_MISC_KERNEL;
			al->level = 'k';
		} else {
@@ -1128,7 +1128,7 @@ int fill_callchain_info(struct addr_location *al, struct callchain_cursor_node *
			al->level = 'g';
		}
	} else {
		if (machine__is_host(al->mg->machine)) {
		if (machine__is_host(al->maps->machine)) {
			al->cpumode = PERF_RECORD_MISC_USER;
			al->level = '.';
		} else if (perf_guest) {
+6 −6
Original line number Diff line number Diff line
@@ -181,7 +181,7 @@ static int db_ids_from_al(struct db_export *dbe, struct addr_location *al,
	if (al->map) {
		struct dso *dso = al->map->dso;

		err = db_export__dso(dbe, dso, al->mg->machine);
		err = db_export__dso(dbe, dso, al->maps->machine);
		if (err)
			return err;
		*dso_db_id = dso->db_id;
@@ -251,7 +251,7 @@ static struct call_path *call_path_from_sample(struct db_export *dbe,
		 */
		al.sym = node->ms.sym;
		al.map = node->ms.map;
		al.mg  = thread->maps;
		al.maps = thread->maps;
		al.addr = node->ip;

		if (al.map && !al.sym)
@@ -360,13 +360,13 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
	if (err)
		return err;

	err = db_export__machine(dbe, al->mg->machine);
	err = db_export__machine(dbe, al->maps->machine);
	if (err)
		return err;

	main_thread = thread__main_thread(al->mg->machine, thread);
	main_thread = thread__main_thread(al->maps->machine, thread);

	err = db_export__threads(dbe, thread, main_thread, al->mg->machine, &comm);
	err = db_export__threads(dbe, thread, main_thread, al->maps->machine, &comm);
	if (err)
		goto out_put;

@@ -380,7 +380,7 @@ int db_export__sample(struct db_export *dbe, union perf_event *event,
		goto out_put;

	if (dbe->cpr) {
		struct call_path *cp = call_path_from_sample(dbe, al->mg->machine,
		struct call_path *cp = call_path_from_sample(dbe, al->maps->machine,
							     thread, sample,
							     evsel);
		if (cp) {
+3 −3
Original line number Diff line number Diff line
@@ -461,7 +461,7 @@ struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
	struct machine *machine = mg->machine;
	bool load_map = false;

	al->mg = mg;
	al->maps = mg;
	al->thread = thread;
	al->addr = addr;
	al->cpumode = cpumode;
@@ -474,13 +474,13 @@ struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,

	if (cpumode == PERF_RECORD_MISC_KERNEL && perf_host) {
		al->level = 'k';
		al->mg = mg = &machine->kmaps;
		al->maps = mg = &machine->kmaps;
		load_map = true;
	} else if (cpumode == PERF_RECORD_MISC_USER && perf_host) {
		al->level = '.';
	} else if (cpumode == PERF_RECORD_MISC_GUEST_KERNEL && perf_guest) {
		al->level = 'g';
		al->mg = mg = &machine->kmaps;
		al->maps = mg = &machine->kmaps;
		load_map = true;
	} else if (cpumode == PERF_RECORD_MISC_GUEST_USER && perf_guest) {
		al->level = 'u';
+4 −4
Original line number Diff line number Diff line
@@ -692,7 +692,7 @@ __hists__add_entry(struct hists *hists,
			.ino = ns ? ns->link_info[CGROUP_NS_INDEX].ino : 0,
		},
		.ms = {
			.mg	= al->mg,
			.mg	= al->maps,
			.map	= al->map,
			.sym	= al->sym,
		},
@@ -760,7 +760,7 @@ struct hist_entry *hists__add_entry_block(struct hists *hists,
		.block_info = block_info,
		.hists = hists,
		.ms = {
			.mg  = al->mg,
			.mg  = al->maps,
			.map = al->map,
			.sym = al->sym,
		},
@@ -895,7 +895,7 @@ iter_next_branch_entry(struct hist_entry_iter *iter, struct addr_location *al)
	if (iter->curr >= iter->total)
		return 0;

	al->mg  = bi[i].to.ms.mg;
	al->maps = bi[i].to.ms.mg;
	al->map = bi[i].to.ms.map;
	al->sym = bi[i].to.ms.sym;
	al->addr = bi[i].to.addr;
@@ -1072,7 +1072,7 @@ iter_add_next_cumulative_entry(struct hist_entry_iter *iter,
		.comm = thread__comm(al->thread),
		.ip = al->addr,
		.ms = {
			.mg  = al->mg,
			.mg  = al->maps,
			.map = al->map,
			.sym = al->sym,
		},
+3 −3
Original line number Diff line number Diff line
@@ -1934,7 +1934,7 @@ static void ip__resolve_ams(struct thread *thread,

	ams->addr = ip;
	ams->al_addr = al.addr;
	ams->ms.mg  = al.mg;
	ams->ms.mg  = al.maps;
	ams->ms.sym = al.sym;
	ams->ms.map = al.map;
	ams->phys_addr = 0;
@@ -1952,7 +1952,7 @@ static void ip__resolve_data(struct thread *thread,

	ams->addr = addr;
	ams->al_addr = al.addr;
	ams->ms.mg  = al.mg;
	ams->ms.mg  = al.maps;
	ams->ms.sym = al.sym;
	ams->ms.map = al.map;
	ams->phys_addr = phys_addr;
@@ -2069,7 +2069,7 @@ static int add_callchain_ip(struct thread *thread,
		iter_cycles = iter->cycles;
	}

	ms.mg  = al.mg;
	ms.mg  = al.maps;
	ms.map = al.map;
	ms.sym = al.sym;
	srcline = callchain_srcline(&ms, al.addr);
Loading