diff options
author | Jakub Kicinski <kuba@kernel.org> | 2020-11-06 17:32:55 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-06 17:33:38 -0800 |
commit | ae0d0bb29b311ee3c71c8796f76d309a3779c8d9 (patch) | |
tree | ae8e6f90d4eec5594bf42fe7aa9c3d989fc4317e /tools/perf/util/machine.c | |
parent | 9f32c27eb4fc4426eedd511697d921a932f7dba6 (diff) | |
parent | bf3e76289cd28b87f679cd53e26d67fd708d718a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/util/machine.c')
-rw-r--r-- | tools/perf/util/machine.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 7d4194ffc5b0..15385ea00190 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -786,11 +786,20 @@ static int machine__process_ksymbol_unregister(struct machine *machine, union perf_event *event, struct perf_sample *sample __maybe_unused) { + struct symbol *sym; struct map *map; map = maps__find(&machine->kmaps, event->ksymbol.addr); - if (map) + if (!map) + return 0; + + if (map != machine->vmlinux_map) maps__remove(&machine->kmaps, map); + else { + sym = dso__find_symbol(map->dso, map->map_ip(map, map->start)); + if (sym) + dso__delete_symbol(map->dso, sym); + } return 0; } |