* [PATCH] perf/doc: revise the description about PR_TASK_PERF_EVENTS_{ENABLE,DISABLE}
@ 2023-06-12 2:35 Changbin Du
2023-07-18 1:42 ` Changbin Du
0 siblings, 1 reply; 2+ messages in thread
From: Changbin Du @ 2023-06-12 2:35 UTC (permalink / raw)
To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo
Cc: Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
Ian Rogers, Adrian Hunter, linux-perf-users, linux-kernel,
hw.huiwang, Changbin Du
The behavior of PR_TASK_PERF_EVENTS_{ENABLE,DISABLE} has been changed
since v2.6.30, commit 082ff5a2767a ("perf_counter: Change pctrl()
behaviour").
This patch revises the documentation about these two prctl options to match
the real behavior. The linux man pages should also be updated.
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Changbin Du <changbin.du@huawei.com>
---
tools/perf/design.txt | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tools/perf/design.txt b/tools/perf/design.txt
index aa8cfeabb743..cc9a2716d5ec 100644
--- a/tools/perf/design.txt
+++ b/tools/perf/design.txt
@@ -439,16 +439,15 @@ Additionally, non-inherited overflow counters can use
to enable a counter for 'nr' events, after which it gets disabled again.
-A process can enable or disable all the counter groups that are
-attached to it, using prctl:
+A thread can enable or disable all the counter groups that are
+created by itself, using prctl:
prctl(PR_TASK_PERF_EVENTS_ENABLE);
prctl(PR_TASK_PERF_EVENTS_DISABLE);
-This applies to all counters on the current process, whether created
-by this process or by another, and doesn't affect any counters that
-this process has created on other processes. It only enables or
+This applies to all counters created by this thread, and doesn't affect any
+counters that created by other processes or threads. It only enables or
disables the group leaders, not any other members in the groups.
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] perf/doc: revise the description about PR_TASK_PERF_EVENTS_{ENABLE,DISABLE}
2023-06-12 2:35 [PATCH] perf/doc: revise the description about PR_TASK_PERF_EVENTS_{ENABLE,DISABLE} Changbin Du
@ 2023-07-18 1:42 ` Changbin Du
0 siblings, 0 replies; 2+ messages in thread
From: Changbin Du @ 2023-07-18 1:42 UTC (permalink / raw)
To: Changbin Du
Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
Ian Rogers, Adrian Hunter, linux-perf-users, linux-kernel,
hw.huiwang
Hi Arnaldo,
Could you pick this? So I can update the prctl man pages as well.
On Mon, Jun 12, 2023 at 10:35:23AM +0800, Changbin Du wrote:
> The behavior of PR_TASK_PERF_EVENTS_{ENABLE,DISABLE} has been changed
> since v2.6.30, commit 082ff5a2767a ("perf_counter: Change pctrl()
> behaviour").
>
> This patch revises the documentation about these two prctl options to match
> the real behavior. The linux man pages should also be updated.
>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Changbin Du <changbin.du@huawei.com>
> ---
> tools/perf/design.txt | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/tools/perf/design.txt b/tools/perf/design.txt
> index aa8cfeabb743..cc9a2716d5ec 100644
> --- a/tools/perf/design.txt
> +++ b/tools/perf/design.txt
> @@ -439,16 +439,15 @@ Additionally, non-inherited overflow counters can use
>
> to enable a counter for 'nr' events, after which it gets disabled again.
>
> -A process can enable or disable all the counter groups that are
> -attached to it, using prctl:
> +A thread can enable or disable all the counter groups that are
> +created by itself, using prctl:
>
> prctl(PR_TASK_PERF_EVENTS_ENABLE);
>
> prctl(PR_TASK_PERF_EVENTS_DISABLE);
>
> -This applies to all counters on the current process, whether created
> -by this process or by another, and doesn't affect any counters that
> -this process has created on other processes. It only enables or
> +This applies to all counters created by this thread, and doesn't affect any
> +counters that created by other processes or threads. It only enables or
> disables the group leaders, not any other members in the groups.
>
>
> --
> 2.25.1
>
--
Cheers,
Changbin Du
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-18 1:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-12 2:35 [PATCH] perf/doc: revise the description about PR_TASK_PERF_EVENTS_{ENABLE,DISABLE} Changbin Du
2023-07-18 1:42 ` Changbin Du
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).