]> git.baikalelectronics.ru Git - kernel.git/commit
perf session: Cache sample objects
authorThomas Gleixner <tglx@linutronix.de>
Tue, 30 Nov 2010 17:49:53 +0000 (17:49 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 30 Nov 2010 22:04:18 +0000 (20:04 -0200)
commit4285b49072ffe3700599a828562fa6ab102f3bf2
tree1e103a173a5454adee9235c52558eef22fc24214
parent2c10c7e86e49f83ce318ee4ee527174ee4f11a86
perf session: Cache sample objects

When the sample queue is flushed we free the sample reference objects. Though
we need to malloc new objects when we process further. Stop the malloc/free
orgy and cache the already allocated object for resuage. Only allocate when
the cache is empty.

Performance gain: ~ 10%

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20101130163820.338488630@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/session.c
tools/perf/util/session.h