public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Beau Belgrave <beaub@linux.microsoft.com>
Subject: [for-linus][PATCH 15/15] tracing/user_events: Document auto-cleanup and remove dyn_event refs
Date: Thu, 15 Jun 2023 09:05:46 -0400	[thread overview]
Message-ID: <20230615133417.709819338@goodmis.org> (raw)
In-Reply-To: 20230615130531.200384328@goodmis.org

From: Beau Belgrave <beaub@linux.microsoft.com>

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.

Link: https://lkml.kernel.org/r/20230614163336.5797-7-beaub@linux.microsoft.com

Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 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
-- 
2.39.2

      parent reply	other threads:[~2023-06-15 13:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15 13:05 [for-linus][PATCH 00/15] tracing: Updates for 6.4 Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 01/15] tracing/rv/rtla: Update MAINTAINERS file to point to proper mailing list Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 02/15] tracing/user_events: Prevent same name but different args event Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 03/15] tracing/user_events: Handle matching arguments that is null from dyn_events Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 04/15] tracing: Modify print_fields() for fields output order Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 05/15] tracing/user_events: Fix the incorrect trace record for empty arguments events Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 06/15] selftests/user_events: Add ftrace self-test " Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 07/15] selftests/user_events: Clear the events after perf self-test Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 08/15] selftests/user_events: Add perf self-test for empty arguments events Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 09/15] tracing/user_events: Remove user_ns walk for groups Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 10/15] tracing/user_events: Store register flags on events Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 11/15] tracing/user_events: Track refcount consistently via put/get Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 12/15] tracing/user_events: Add auto cleanup and future persist flag Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 13/15] selftests/user_events: Ensure auto cleanup works as expected Steven Rostedt
2023-06-15 13:05 ` [for-linus][PATCH 14/15] selftests/user_events: Adapt dyn_test to non-persist events Steven Rostedt
2023-06-15 13:05 ` Steven Rostedt [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=20230615133417.709819338@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=beaub@linux.microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mhiramat@kernel.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