]> git.baikalelectronics.ru Git - kernel.git/commit
perf session: Free the ref_reloc_sym memory at the right place
authorArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 2 Aug 2010 21:18:28 +0000 (18:18 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 2 Aug 2010 21:18:28 +0000 (18:18 -0300)
commit8570654574ce355d61134ad717fe2ba494cacbe8
treea07e78f58e625eb69dfda8f32ab46e5316551025
parent88d316871b2262620afdfb07aa767d8f4a8ee546
perf session: Free the ref_reloc_sym memory at the right place

Which is at perf_session__destroy_kernel_maps, counterpart to the
perf_session__create_kernel_maps where the kmap structure is located, just
after the vmlinux_maps.

Make it also check if the kernel maps were actually created, which may not
be the case if, for instance, perf_session__new can't complete due to
permission problems in, for instance, a 'perf report' case, when a
segfault will take place, that is how this was noticed.

The problem was introduced in 9c67859, thus post .35.

This also adds code to release guest machines as them are also created
in perf_session__create_kernel_maps, so should be deleted on this newly
introduced counterpart, perf_session__destroy_kernel_maps.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/map.c
tools/perf/util/map.h
tools/perf/util/session.c
tools/perf/util/symbol.c
tools/perf/util/symbol.h