Re: [patch] perf_event_open.2: fix prctl behavior description

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Vince,

On 06/11/2018 07:26 PM, Vince Weaver wrote:

Some discussion on the linux-perf-users list has turned up that the
perf_event_open.2 description of how PR_TASK_PERF_EVENTS_ENABLE /
PR_TASK_PERF_EVENTS_DISABLE prctl() works is misleading.

The descriptions were based on the tools/perf/design.txt document
which describes behavior that was removed in 082ff5a2767a06
(prior to 2.6.31, the first release with perf_event_open support).

I have written some tests in my perf_event_tests testsuite that verifies
the behavior of prctl() in this case.

Thanks. I have applied this patch.

Cheers,

Michael

Signed-off-by: Vince Weaver <vincent.weaver@xxxxxxxxx>

diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2
index d5b2d060d..e695fb151 100644
--- a/man2/perf_event_open.2
+++ b/man2/perf_event_open.2
@@ -2929,18 +2929,18 @@ a previous
  .BR bpf (2)
  system call.
  .SS Using prctl(2)
-A process can enable or disable all the event groups that are
-attached to it using the
+A process can enable or disable all currently open event groups
+using the
  .BR prctl (2)
  .B PR_TASK_PERF_EVENTS_ENABLE
  and
  .B PR_TASK_PERF_EVENTS_DISABLE
  operations.
-This applies to all counters on the calling process, whether created by
-this process or by another, and does not affect any counters that this
-process has created on other processes.
-It enables or disables only
-the group leaders, not any other members in the groups.
+This applies only to events created locally by the calling process.
+This does not apply to events created by other processes attached
+to the calling process or inherited events from a parent process.
+Only group leaders are enabled and disabled,
+not any other members of the groups.
  .SS perf_event related configuration files
  .PP
  Files in




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux