]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
perf evsel: Auto allocate resources needed for some methods
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 4 Jan 2011 02:13:17 +0000 (00:13 -0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 4 Jan 2011 02:31:32 +0000 (00:31 -0200)
commit4eed11d5e24540dc133003b6e8f904cb747ac4bb
treed399f73e520d93ad0912a1c2a24d62e577d47798
parent86bd5e8603b00b06189328c6d7034d2dc434d6bb
perf evsel: Auto allocate resources needed for some methods

While writing the first user of the routines created from the ad-hoc
routines in the existing builtins I noticed that the resulting set of
calls was too long, reduce it by doing some best effort allocations.

Tools that need to operate on multiple threads and cpus should pre-allocate
enough resources by explicitely calling the perf_evsel__alloc_{fd,counters}
methods.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c