Lines Matching +full:event +full:- +full:name

2 user_events: User-based Event Tracing
8 --------
20 requires CAP_PERFMON due to the event persisting, otherwise -EPERM is returned.
25 enabled the event and data should be written. The registration will give back
36 -----------
59 /* Input: Pointer to string with event name, description and flags */
62 /* Output: Index of the event to use when writing data */
70 + enable_bit: The bit to reflect the event status at the address specified by
74 This must be 4 (32-bit) or 8 (64-bit). 64-bit values are only allowed to be
75 used on 64-bit kernels, however, 32-bit can be used on all kernels.
79 support for lower versions of the kernel. If a flag is not supported -EINVAL
82 + enable_addr: The address of the value to use to reflect event status. This
85 + name_args: The name and arguments to describe the event, see command format
90 + USER_EVENT_REG_PERSIST: The event will not delete upon the last reference
91 closing. Callers may use this if an event should exist even after the
92 process closes or unregisters the event. Requires CAP_PERFMON otherwise
93 -EPERM is returned.
95 + USER_EVENT_REG_MULTI_FORMAT: The event can contain multiple formats. This
96 allows programs to prevent themselves from being blocked when their event
97 format changes and they wish to use the same name. When this flag is used the
98 tracepoint name will be in the new format of "name.unique_id" vs the older
99 format of "name". A tracepoint will be created for each unique pair of name
100 and format. This means if several processes use the same name and format,
101 they will use the same tracepoint. If yet another process uses the same name,
104 the various different formats of the event name they are interested in
105 recording. The system name of the tracepoint will also use "user_events_multi"
106 instead of "user_events". This prevents single-format event names conflicting
107 with any multi-format event names within tracefs. The unique_id is output as
108 a hex string. Recording programs should ensure the tracepoint name starts with
109 the event name they registered and has a suffix that starts with . and only
110 has hex characters. For example to find all versions of the event "test" you
111 can use the regex "^test\.[0-9a-fA-F]+$".
116 event when writing out data. The index is unique to this instance of the file
119 User based events show up under tracefs like any other event under the
121 events need to use /sys/kernel/tracing/events/user_events/[name]/enable
122 or perf record -e user_events:[name] when attaching/recording.
124 **NOTE:** The event subsystem name by default is "user_events". Callers should
126 future to change the subsystem name per-process to accommodate event isolation.
127 In addition if the USER_EVENT_REG_MULTI_FORMAT flag is used the tracepoint name
128 will have a unique id appended to it and the system name will be
135 name[:FLAG1[,FLAG2...]] [Field1[;Field2...]]
145 type name [size]
166 --------
167 Deleting an event from within a user process is done via ioctl() out to the
171 This command only requires a single string specifying the event to delete by
172 its name. Delete will only succeed if there are no references left to the
173 event (in both user and kernel space). User programs should use a separate file
176 **NOTE:** By default events will auto-delete when there are no references left
177 to the event. If programs do not want auto-delete, they must use the
178 USER_EVENT_REG_PERSIST flag when registering the event. Once that flag is used
179 the event exists until DIAG_IOCSDEL is invoked. Both register and delete of an
180 event that persists requires CAP_PERFMON, otherwise -EPERM is returned. When
181 there are multiple formats of the same event name, all events with the same
182 name will be attempted to be deleted. If only a specific version is wanted to
184 that specific format of the event.
187 -------------
188 If after registering an event it is no longer wanted to be updated then it can
191 deleting actually removes the event from the system. Unregistering simply tells
192 the kernel your process is no longer interested in updates to the event.
228 ------
229 When tools attach/record user based events the status of the event is updated
231 writev() calls when something is actively attached to the event.
233 The kernel will update the specified bit that was registered for the event as
234 tools attach/detach from the event. User programs simply check if the bit is set
240 Name [# Comments]
246 For example, on a system that has a single event the output looks like this::
253 If a user enables the user event via ftrace, the output would change to this::
261 ------------
262 After registering an event the same fd that was used to register can be used
263 to write an entry for that event. The write_index returned must be at the start
264 of the data, then the remaining data is treated as the payload of the event.
267 payload of the event. Then the data would have to be 8 bytes (2 ints) in size,
278 the index and the following vector(s) being the actual event payload.
303 ------------