Messages in this thread | | | From | Nelson Elhage <> | Subject | [PATCH 0/3] perf: builtin-record: Be more helpful when running up against mlock limits. | Date | Mon, 19 Dec 2011 08:39:29 -0500 |
| |
With the current code, it's relatively easy to run up against the perf_event_mlock_kb limit if you try to attach to a multithreaded target with 'perf record -p', because perf will attempt to mmap 512k per target thread, and the default mlock limit is (512k + 1 page), total.
Current, this results in a completely inscrutable Fatal: failed to mmap with 22 (Invalid argument)
We should perhaps automatically detect a better choice of mmap_pages, but in the meanwhile, it's easy to improve the error to give users some guidance about what's going on, so that hopefully I can be the last person to have to source-dive to figure out what's going on.
| |