perf_event_open.2. Clarify issues with the exclusive bit

Warn that using the perf_event_open "exclusive" bit, while it might seem
like a good idea, might lead to all 0 results in some common usage cases.

Reported-by: Sudhanshu Goswami <Sudhanshu.Goswami@emc.com>
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Vince Weaver 2013-12-19 12:09:29 -05:00 committed by Michael Kerrisk
parent 8f7f19ade9
commit bea10c8c40
1 changed files with 7 additions and 0 deletions

View File

@ -775,6 +775,13 @@ it should be the only group using the CPU's counters.
In the future this may allow monitoring programs to
support PMU features that need to run alone so that they do not
disrupt other hardware counters.
Note that many unexpected situations may prevent events with the
.I exclusive
bit set from ever running.
This includes any users running a system-wide
measurement as well as any kernel use of the performance counters
(including the commonly enabled NMI Watchdog Timer interface).
.TP
.IR "exclude_user"
If this bit is set, the count excludes events that happen in user space.