perf grows endlessly

From: David Miller
Date: Tue Mar 27 2012 - 04:18:36 EST

This is easy to trigger, just run perf top or similar while something
loops doing "gcc -o foo ...; ./foo; rm foo;" dsos__find() starts to
move up gradually in the profiles (yes, even if you turn the dso
lists into hash tables, guess what I tried first... :-)

Essentially, the problem is that perf never throws away dsos, so the
dso list grows every iteration of that loop. This isn't a
manufactured test case, the glibc testsuite does this during it's
conformance test. It's basically trying to build and execute a
program referencing a symbol, once for every symbol specified in
each and every standard (ISO, ISO99, POSIX, XPG3, etc.)

I suppose you could say this dso issue is indirectly related to the
issue discussed over the weekend where we refer to out-of-date maps
from hist entries.

Hist and thread entries do eventually get collapsed and purged, but
this just never propagates properly.

My initial impression is that we'll need to properly reference count
and periodically sweep dso objects are some point.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at