From patchwork Wed Jun 14 16:33:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beau Belgrave X-Patchwork-Id: 108049 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp87908vqr; Wed, 14 Jun 2023 09:50:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7aCT+So+LC94AVUjNcyVsfSdzjPF6l4FCbu3R94N/ob2G542QVjRuTepH98LnTgvQZ8r/6 X-Received: by 2002:a05:6a20:729d:b0:100:3964:6cb with SMTP id o29-20020a056a20729d00b00100396406cbmr2722933pzk.40.1686761428478; Wed, 14 Jun 2023 09:50:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686761428; cv=none; d=google.com; s=arc-20160816; b=mLQUC/q/CgWQ6KPSy8Rd3GfIUw9bMK1pacw7/qMoCR5U0yssmknuFmi467IjsiGZ4S 08kRNzaP5HCz06BaPSpN6me/6ct4iLrZT0J4zr343bDeN4rIXdT+rrm6/g6v42SvpdSR ktSMzZXJxhhgdzcvZfWPGT3kHwx6MGJC7nFNnbG/26aUzVoKGoctj53wKuU0rrj0AGTs TFBXNLnZ5Pv7Z/labVLAiUYl4+ogl5e+TJKnSX2e7ThGbSWH8iJBrrR5KJwGxxrU/+F+ E7dyGnjKH8lLSeHL6wry7isjx13iJUClJDfqBntdyUdLPr9TCCHTbK4sn82nZNom5lJy 01aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=L6ewCnTLmvd3IAdzmYn9pAB0e+CkfQZzUgJPoFiFoKw=; b=NoKSdeW9FeucVwzdTYxswIOosbNGBI0zuOLqDZdHCfHsjNfgnNP/g6zxZIFrLFCLXs /PlGrM3rWqgYMcYhvPGlySCYL/PtCwCFvIPk2yJEx6nzMmo8CZ3VFGal8KNEvWlnN52o xEMVVXR3TL+Sk6yM44qwBS4woGwf0r9wUfu01wHePDZkkiSfvEsl3jS1B1dsii22BbPH 7IG7Z5Jy9Pv66AUTzzwr7+88goe8y8Rie5XAs1dqWgZ9tLUelmZzgFd4lKTaptaSY7hl nX6+VyfJBKIRe8MBClnih1doNHC+Ua8kytNeE2q1N5i69ZR+Ctfju5ZhrvyvWOSRwtce a3DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=HEasVLt6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bm18-20020a656e92000000b005481915c0d1si7608165pgb.45.2023.06.14.09.50.14; Wed, 14 Jun 2023 09:50:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=HEasVLt6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234438AbjFNQeL (ORCPT + 99 others); Wed, 14 Jun 2023 12:34:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234236AbjFNQdn (ORCPT ); Wed, 14 Jun 2023 12:33:43 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 327EF1FDC; Wed, 14 Jun 2023 09:33:42 -0700 (PDT) Received: from W11-BEAU-MD.localdomain (unknown [76.135.27.212]) by linux.microsoft.com (Postfix) with ESMTPSA id A63B320FEB2B; Wed, 14 Jun 2023 09:33:41 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A63B320FEB2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1686760421; bh=L6ewCnTLmvd3IAdzmYn9pAB0e+CkfQZzUgJPoFiFoKw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HEasVLt6aR+pIq1LBr9t8DKN/CTK4zMPwQNz2URzNu/kzusgo0Or5zhpKXPVqFq0L xs0ONMe7OEuXUks1Oui2TH6zEhXq6GBUoAB7K+uEalcjPQ/HkWb8MH1WcRzTPN8opn 1n5IU50pQ7Vrrry1XmfMjiaBtmVDT/OAowWn75hk= From: Beau Belgrave To: rostedt@goodmis.org, mhiramat@kernel.org Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, ast@kernel.org, dcook@linux.microsoft.com Subject: [PATCH v3 6/6] tracing/user_events: Document auto-cleanup and remove dyn_event refs Date: Wed, 14 Jun 2023 09:33:36 -0700 Message-Id: <20230614163336.5797-7-beaub@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230614163336.5797-1-beaub@linux.microsoft.com> References: <20230614163336.5797-1-beaub@linux.microsoft.com> MIME-Version: 1.0 X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768697551318407882?= X-GMAIL-MSGID: =?utf-8?q?1768697551318407882?= Now user_events auto-cleanup upon the last reference by default. This makes it not possible to use the dynamics event file via tracefs. Document that auto-cleanup is enabled by default and remove the refernce to /sys/kernel/tracing/dynamic_events file to make this clear. Signed-off-by: Beau Belgrave --- Documentation/trace/user_events.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Documentation/trace/user_events.rst b/Documentation/trace/user_events.rst index f79987e16cf4..e7b07313550a 100644 --- a/Documentation/trace/user_events.rst +++ b/Documentation/trace/user_events.rst @@ -14,10 +14,6 @@ Programs can view status of the events via /sys/kernel/tracing/user_events_status and can both register and write data out via /sys/kernel/tracing/user_events_data. -Programs can also use /sys/kernel/tracing/dynamic_events to register and -delete user based events via the u: prefix. The format of the command to -dynamic_events is the same as the ioctl with the u: prefix applied. - Typically programs will register a set of events that they wish to expose to tools that can read trace_events (such as ftrace and perf). The registration process tells the kernel which address and bit to reflect if any tool has @@ -144,6 +140,9 @@ its name. Delete will only succeed if there are no references left to the event (in both user and kernel space). User programs should use a separate file to request deletes than the one used for registration due to this. +**NOTE:** By default events will auto-delete when there are no references left +to the event. Flags in the future may change this logic. + Unregistering ------------- If after registering an event it is no longer wanted to be updated then it can