lkml.org 
[lkml]   [2013]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/25] perf top: Delete maps on exit
On 1/31/13 10:25 AM, Arnaldo Carvalho de Melo wrote:
> From: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> Removing one more memory leak found with valgrind.

If you are spending time one memory consumption by perf-top one thing to
look at is handling of terminated threads. Currently, terminated threads
are stuck onto the dead_threads list and only cleaned up when perf
terminates (perf_session__delete_dead_threads).

Since the thread entries can still be referenced in hists perhaps a
refcnt is needed that indicates when the threads can be deleted. From
there regular calls to perf_session__delete_dead_threads can be made. I
needed to add a regular call to that function in my perf daemon to keep
memory usage stable - but then I don't have lingering references.

A lot of work yes but will be needed if there is to be an official
libperf.so that apps can leverage.

David



\
 
 \ /
  Last update: 2013-01-31 20:03    [W:0.177 / U:1.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site