From 75ee11e5145bc47bf0ca0719e6276a31f39f6759 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Wed, 13 Nov 2013 12:59:33 -0500 Subject: [PATCH] perf_event_open.2: Update description for mmap_data bit Here's an updated version of [David Ahern's] patch that expands the "mmap" definition as well as that of "mmap_data". Also some manpage related formatting improvements from the original patch. Link: https://lkml.org/lkml/2013/11/11/505 Signed-off-by: Vince Weaver Acked-by: David Ahern Cc: Arnaldo Carvalho de Melo Signed-off-by: Michael Kerrisk --- man2/perf_event_open.2 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2 index 87764ba12..4de02673b 100644 --- a/man2/perf_event_open.2 +++ b/man2/perf_event_open.2 @@ -796,7 +796,16 @@ If set, don't count when the CPU is idle. .IR "mmap" The .I mmap -bit enables recording of exec mmap events. +bit enables generation of +.I PERF_RECORD_MMAP +samples for every +.BR mmap (2) +call that has +.I PROT_EXEC +set. +This allows tools to notice new executable code being mapped into +a program (dynamic shared libraries for example) +so that addresses can be mapped back to the original code. .TP .IR "comm" The @@ -875,8 +884,14 @@ See also .IR "mmap_data" " (Since Linux 2.6.36)" The counterpart of the .I mmap -field, but enables including data mmap events -in the ring-buffer. +field. +This enables generation of +.I PERF_RECORD_MMAP +samples for +.BR mmap (2) +calls that do not have +.I PROT_EXEC +set (for example data and SysV shared memory). .TP .IR "sample_id_all" " (Since Linux 2.6.38)" If set, then TID, TIME, ID, STREAM_ID, and CPU can