From 591765fdaf7ea1888157f342b67b0461f2e5ed9b Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 30 Jul 2010 18:28:42 -0300 Subject: 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 Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Mike Galbraith Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tom Zanussi LKML-Reference: Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/thread.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/perf/util/thread.h') diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h index ee6bbcf277ca..688500ff826f 100644 --- a/tools/perf/util/thread.h +++ b/tools/perf/util/thread.h @@ -20,6 +20,8 @@ struct thread { struct perf_session; +void thread__delete(struct thread *self); + int find_all_tid(int pid, pid_t ** all_tid); int thread__set_comm(struct thread *self, const char *comm); int thread__comm_len(struct thread *self); -- cgit v1.2.3-59-g8ed1b