• Frederic Weisbecker's avatar
    perf: mmap 512 kiB by default · 800cd25c
    Frederic Weisbecker authored
    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: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Signed-off-by: default avatarPeter 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: default avatarIngo Molnar <mingo@elte.hu>
    800cd25c
builtin-record.c 21.9 KB