From nobody Sun Feb 8 09:16:52 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65C97C7EE2E for ; Mon, 12 Jun 2023 02:35:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232577AbjFLCfy (ORCPT ); Sun, 11 Jun 2023 22:35:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229902AbjFLCfv (ORCPT ); Sun, 11 Jun 2023 22:35:51 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7855B19A; Sun, 11 Jun 2023 19:35:49 -0700 (PDT) Received: from kwepemi500013.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QfbJr4gx3zqTm2; Mon, 12 Jun 2023 10:30:52 +0800 (CST) Received: from M910t.huawei.com (10.110.54.157) by kwepemi500013.china.huawei.com (7.221.188.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Mon, 12 Jun 2023 10:35:46 +0800 From: Changbin Du To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo CC: Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , , , , Changbin Du Subject: [PATCH] perf/doc: revise the description about PR_TASK_PERF_EVENTS_{ENABLE,DISABLE} Date: Mon, 12 Jun 2023 10:35:23 +0800 Message-ID: <20230612023523.3918618-1-changbin.du@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.110.54.157] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500013.china.huawei.com (7.221.188.120) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 Cc: Peter Zijlstra Signed-off-by: Changbin Du --- 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 =20 to enable a counter for 'nr' events, after which it gets disabled again. =20 -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: =20 prctl(PR_TASK_PERF_EVENTS_ENABLE); =20 prctl(PR_TASK_PERF_EVENTS_DISABLE); =20 -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. =20 =20 --=20 2.25.1