diff options
-rw-r--r-- | tools/perf/builtin-record.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index db6adecf46f1..17d1dcb3c667 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -41,7 +41,7 @@ static u64 user_interval = ULLONG_MAX; | |||
41 | static u64 default_interval = 0; | 41 | static u64 default_interval = 0; |
42 | 42 | ||
43 | static unsigned int page_size; | 43 | static unsigned int page_size; |
44 | static unsigned int mmap_pages = 128; | 44 | static unsigned int mmap_pages = UINT_MAX; |
45 | static unsigned int user_freq = UINT_MAX; | 45 | static unsigned int user_freq = UINT_MAX; |
46 | static int freq = 1000; | 46 | static int freq = 1000; |
47 | static int output; | 47 | static int output; |
@@ -513,6 +513,10 @@ static int __cmd_record(int argc, const char **argv) | |||
513 | if (have_tracepoints(&evsel_list->entries)) | 513 | if (have_tracepoints(&evsel_list->entries)) |
514 | perf_header__set_feat(&session->header, HEADER_TRACE_INFO); | 514 | perf_header__set_feat(&session->header, HEADER_TRACE_INFO); |
515 | 515 | ||
516 | /* 512 kiB: default amount of unprivileged mlocked memory */ | ||
517 | if (mmap_pages == UINT_MAX) | ||
518 | mmap_pages = (512 * 1024) / page_size; | ||
519 | |||
516 | if (forks) { | 520 | if (forks) { |
517 | child_pid = fork(); | 521 | child_pid = fork(); |
518 | if (child_pid < 0) { | 522 | if (child_pid < 0) { |