From: Beau Belgrave <beaub@linux.microsoft.com>
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 v2 5/5] tracing/user_events: Add persist flag documentation
Date: Mon, 5 Jun 2023 16:39:00 -0700 [thread overview]
Message-ID: <20230605233900.2838-6-beaub@linux.microsoft.com> (raw)
In-Reply-To: <20230605233900.2838-1-beaub@linux.microsoft.com>
There is now a flag for user_events to use when registering events to
have events continue to exist upon the last reference put. Add the new
flag, USER_EVENT_REG_PERSIST, to user_events documentation files to let
people know when to use it.
Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
---
Documentation/trace/user_events.rst | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/Documentation/trace/user_events.rst b/Documentation/trace/user_events.rst
index f79987e16cf4..6736e5a32293 100644
--- a/Documentation/trace/user_events.rst
+++ b/Documentation/trace/user_events.rst
@@ -39,6 +39,14 @@ DIAG_IOCSREG.
This command takes a packed struct user_reg as an argument::
+ enum user_reg_flag {
+ /* Event will not delete upon last reference closing */
+ USER_EVENT_REG_PERSIST = 1U << 0,
+
+ /* This value or above is currently non-ABI */
+ USER_EVENT_REG_MAX = 1U << 1,
+ };
+
struct user_reg {
/* Input: Size of the user_reg structure being used */
__u32 size;
@@ -49,7 +57,7 @@ This command takes a packed struct user_reg as an argument::
/* Input: Enable size in bytes at address */
__u8 enable_size;
- /* Input: Flags for future use, set to 0 */
+ /* Input: Flags can be any of the above user_reg_flag values */
__u16 flags;
/* Input: Address to update when enabled */
@@ -73,10 +81,13 @@ The struct user_reg requires all the above inputs to be set appropriately.
This must be 4 (32-bit) or 8 (64-bit). 64-bit values are only allowed to be
used on 64-bit kernels, however, 32-bit can be used on all kernels.
-+ flags: The flags to use, if any. For the initial version this must be 0.
- Callers should first attempt to use flags and retry without flags to ensure
- support for lower versions of the kernel. If a flag is not supported -EINVAL
- is returned.
++ flags: The flags to use, if any. Callers should first attempt to use flags
+ and retry without flags to ensure support for lower versions of the kernel.
+ If a flag is not supported -EINVAL is returned.
+
+ **USER_EVENT_REG_PERSIST**
+ When the last reference is closed for the event, the event will continue
+ to exist until a delete IOCTL is issued by a user.
+ enable_addr: The address of the value to use to reflect event status. This
must be naturally aligned and write accessible within the user program.
--
2.25.1
prev parent reply other threads:[~2023-06-05 23:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 23:38 [PATCH v2 0/5] tracing/user_events: Add auto cleanup and a flag to persist events Beau Belgrave
2023-06-05 23:38 ` [PATCH v2 1/5] tracing/user_events: Store register flags on events Beau Belgrave
2023-06-05 23:38 ` [PATCH v2 2/5] tracing/user_events: Track refcount consistently via put/get Beau Belgrave
2023-06-05 23:38 ` [PATCH v2 3/5] tracing/user_events: Add auto cleanup and a flag to persist events Beau Belgrave
2023-06-07 1:26 ` Alexei Starovoitov
2023-06-07 19:16 ` Beau Belgrave
2023-06-08 20:25 ` Steven Rostedt
2023-06-08 21:22 ` Beau Belgrave
2023-06-13 19:26 ` Steven Rostedt
2023-06-05 23:38 ` [PATCH v2 4/5] tracing/user_events: Add self-test for persist flag Beau Belgrave
2023-06-05 23:39 ` Beau Belgrave [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=20230605233900.2838-6-beaub@linux.microsoft.com \
--to=beaub@linux.microsoft.com \
--cc=ast@kernel.org \
--cc=dcook@linux.microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.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