mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
perf maps: Move kmap::kmaps setup to maps__insert()
So the kmaps pointer setup is centralized and we do not need to update it in all those places (2 current places and few more missing) after calling maps__insert(). Reported-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Tested-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Tested-by: Kim Phillips <kim.phillips@amd.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Michael Petlan <mpetlan@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20200210143218.24948-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
7ce66139a9
commit
484214f49b
2 changed files with 11 additions and 12 deletions
|
@ -543,6 +543,16 @@ void maps__insert(struct maps *maps, struct map *map)
|
|||
__maps__insert(maps, map);
|
||||
++maps->nr_maps;
|
||||
|
||||
if (map->dso && map->dso->kernel) {
|
||||
struct kmap *kmap = map__kmap(map);
|
||||
|
||||
if (kmap)
|
||||
kmap->kmaps = maps;
|
||||
else
|
||||
pr_err("Internal error: kernel dso with non kernel map\n");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* If we already performed some search by name, then we need to add the just
|
||||
* inserted map and resort.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue