perf top: Remove entries from entries_collapsed on decay
authorArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 13 Oct 2011 12:06:54 +0000 (09:06 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 13 Oct 2011 13:29:17 +0000 (10:29 -0300)
commite345fa185ad805cbd3be3397b3cba32bc42ef571
treeaa548f1267b6ecf63f22cd036c75b28a5be375f6
parented7e5662ddff6a60bdae830ff65547c2eeed6f9a
perf top: Remove entries from entries_collapsed on decay

We were removing only when using a --sort order that needs collapsing,
while we also use it in the threaded case, causing memory corruption
because we were scribbling freed hist entries, oops.

Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-k16fb4jsulr7x0ixv43amb6d@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-top.c
tools/perf/util/hist.c
tools/perf/util/hist.h