perf top: Allocate space only for the number of counters used
Reducing memory consumption on a typical desktop machine:
From:
32710 root 20 0 172m 142m 1056 S 0.0 4.7 0:00.37
perf
To:
420 root 20 0 47528 16m 1056 R 0.3 0.5 0:00.24 perf
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <
1258490282-1821-2-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>