perf unwind: Fix map reference counts
authorIan Rogers <irogers@google.com>
Fri, 23 Jun 2023 04:31:07 +0000 (21:31 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 23 Jun 2023 05:13:13 +0000 (22:13 -0700)
commit33941dbd14da4eac40a26ac5fd5f84e1842ffc3a
treeb25907104931d783a499a2df67375adc16379cde
parente4ef3ef1bc0a3d2535427da78b8095ef657eb474
perf unwind: Fix map reference counts

The result of thread__find_map is the map in the passed in
addr_location. Calling addr_location__exit puts that map and so copies
need to do a map__get. Add in the corresponding map__puts.

v2. Add missing map__put when dso is missing.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ivan Babrou <ivan@cloudflare.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Link: https://lore.kernel.org/r/20230623043107.4077510-1-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/unwind-libunwind-local.c