Skip to content

Commit

Permalink
perf machine: Fixup kernel maps ends after adding extra maps
Browse files Browse the repository at this point in the history
I just noticed it would add extra kernel maps after modules.  I think it
should fixup end address of the kernel maps after adding all maps first.

Fixes: 876e80c ("perf tools: Fixup end address of modules")
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/lkml/Z7TvZGjVix2asYWI@x1
Link: https://lore.kernel.org/lkml/Z712hzvv22Ni63f1@google.com
Link: https://lore.kernel.org/r/20250228211734.33781-4-acme@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
  • Loading branch information
Namhyung Kim committed Mar 6, 2025
1 parent 25d9c03 commit f7a46e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/perf/util/machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -1462,8 +1462,6 @@ static int machine__create_modules(struct machine *machine)
if (modules__parse(modules, machine, machine__create_module))
return -1;

maps__fixup_end(machine__kernel_maps(machine));

if (!machine__set_modules_path(machine))
return 0;

Expand Down Expand Up @@ -1557,6 +1555,8 @@ int machine__create_kernel_maps(struct machine *machine)
}
}

maps__fixup_end(machine__kernel_maps(machine));

out_put:
dso__put(kernel);
return ret;
Expand Down

0 comments on commit f7a46e0

Please sign in to comment.