linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Changbin Du <changbin.du@huawei.com>
To: Changbin Du <changbin.du@huawei.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	<linux-perf-users@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <hw.huiwang@huawei.com>
Subject: Re: [PATCH] perf/doc: revise the description about PR_TASK_PERF_EVENTS_{ENABLE,DISABLE}
Date: Tue, 18 Jul 2023 09:42:27 +0800	[thread overview]
Message-ID: <20230718014227.r5kmib2nqo3soyik@M910t> (raw)
In-Reply-To: <20230612023523.3918618-1-changbin.du@huawei.com>

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

      reply	other threads:[~2023-07-18  1:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230718014227.r5kmib2nqo3soyik@M910t \
    --to=changbin.du@huawei.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=hw.huiwang@huawei.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).