Commit 7f73070
committed
perf maps: Introduce map__set_kmap_maps() for kernel maps
JIRA: https://issues.redhat.com/browse/RHEL-77936
upstream
========
commit 99deaf5
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Fri Feb 28 18:17:29 2025 -0300
description
===========
We need to set it in other places than __maps__insert(), so that we can
have access to the 'struct maps' from a kernel 'struct map'.
When building perf with 'DEBUG=1' we can notice it failing a consistency
check done in the check_invariants() function:
root@number:~# perf record -- perf test -w offcpu
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.040 MB perf.data (23 samples) ]
perf: util/maps.c:95: check_invariants: Assertion `map__end(prev) <= map__end(map)' failed.
Aborted (core dumped)
root@number:~#
The investigation on that was happening bisected to 876e80c
("perf tools: Fixup end address of modules"), and the following patches
will plug the problems found, this patch is just legwork on that
direction.
Use the map__set_kmap_maps() name as per a review comment from Ian
Rogers, later there are further suggestions from him on getting rid of
the kmaps variable, see the thread referenced in the Link below.
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-2-acme@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Michael Petlan <mpetlan@redhat.com>1 parent 2f38f4d commit 7f73070
1 file changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
431 | 450 | | |
432 | 451 | | |
433 | 452 | | |
434 | 453 | | |
435 | | - | |
436 | 454 | | |
437 | 455 | | |
438 | 456 | | |
| |||
483 | 501 | | |
484 | 502 | | |
485 | 503 | | |
486 | | - | |
487 | | - | |
488 | 504 | | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
| 505 | + | |
| 506 | + | |
494 | 507 | | |
495 | 508 | | |
496 | 509 | | |
| |||
0 commit comments