perf: mmap 512 kiB by default
authorFrederic Weisbecker <fweisbec@gmail.com>
Thu, 31 Mar 2011 01:35:24 +0000 (03:35 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 31 Mar 2011 11:02:55 +0000 (13:02 +0200)
commit800cd25c12981c99e5401c3551ffffd99f1c6c85
tree8a3b1ef662a9190219aaaad842072495fcd70654
parent20443384fe090c5f8aeb016e7e85659c5bbdd69f
perf: mmap 512 kiB by default

The default setting of perf record is to mmap 128 pages if the user
did not override with -m.

However the page size may vary accross different architecture
settings, giving different default size between each.

Moreover the kernel side still has a default max number of mlocked
pages of 512 kiB + 1 page for unprivileged users. 128 + 1 pages
with page size > 4096 overlaps this threshold.

Thus, better adapt to this limitation and set the default number of
pages to fit those 512 kiB + 1 page.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <1301535324-9735-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-record.c