]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - tools/perf/util/thread.c
perf tools: Release thread resources on PERF_RECORD_EXIT
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 30 Jul 2010 21:28:42 +0000 (18:28 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 30 Jul 2010 21:28:42 +0000 (18:28 -0300)
commit591765fdaf7ea1888157f342b67b0461f2e5ed9b
tree278c5c7e219830596b03bc9ca1aa2a38e69e458e
parent0e60836bbd392300198c5c2d918c18845428a1fe
perf tools: Release thread resources on PERF_RECORD_EXIT

For long running sessions with many threads with short lifetimes the
amount of memory that the buildid process takes is too much.

Since we don't have hist_entries that may be pointing to them, we can
just release the resources associated with each thread when the exit
(PERF_RECORD_EXIT) event is received.

For normal processing we need to annotate maps with hits, and thus
hist_entries pointing to it and drop the ones that had none. Will be
done in a followup patch.

Cc: David S. Miller <davem@davemloft.net>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/build-id.c
tools/perf/util/map.c
tools/perf/util/map.h
tools/perf/util/thread.c
tools/perf/util/thread.h