aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/builtin-record.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index f8fd14fb62e..56bb4476e3b 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -272,8 +272,15 @@ try_again:
272 exit(-1); 272 exit(-1);
273 } 273 }
274 274
275 if (perf_evlist__mmap(evlist, opts->mmap_pages, false) < 0) 275 if (perf_evlist__mmap(evlist, opts->mmap_pages, false) < 0) {
276 if (errno == EPERM)
277 die("Permission error mapping pages.\n"
278 "Consider increasing "
279 "/proc/sys/kernel/perf_event_mlock_kb,\n"
280 "or try again with a smaller value of -m/--mmap_pages.\n"
281 "(current value: %d)\n", opts->mmap_pages);
276 die("failed to mmap with %d (%s)\n", errno, strerror(errno)); 282 die("failed to mmap with %d (%s)\n", errno, strerror(errno));
283 }
277 284
278 if (rec->file_new) 285 if (rec->file_new)
279 session->evlist = evlist; 286 session->evlist = evlist;