Skip to content

Commit 72ed256

Browse files
committed
perf maps: Set the kmaps for newly created/added kernel maps
JIRA: https://issues.redhat.com/browse/RHEL-78197 upstream ======== commit 25d9c03 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Fri Feb 28 18:17:30 2025 -0300 description =========== When using __maps__insert_sorted() the map kmaps field needs to be initialized, as we need kernel maps to work with map__kmap(). Fix it by using the newly introduced map__set_kmap() method. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Reviewed-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/lkml/Z74V0hZXrTLM6VIJ@x1 Link: https://lore.kernel.org/r/20250228211734.33781-3-acme@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Michael Petlan <mpetlan@redhat.com>
1 parent 3d18697 commit 72ed256

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/perf/util/maps.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,6 +798,9 @@ static int __maps__insert_sorted(struct maps *maps, unsigned int first_after_ind
798798
}
799799
RC_CHK_ACCESS(maps)->nr_maps = nr_maps + to_add;
800800
maps__set_maps_by_name_sorted(maps, false);
801+
map__set_kmap_maps(new1, maps);
802+
map__set_kmap_maps(new2, maps);
803+
801804
check_invariants(maps);
802805
return 0;
803806
}

0 commit comments

Comments
 (0)