tracing: Updates for 6.4
Subsystems (3)
Steven Rostedt
maintainerLinus,
Tracing fixes for 6.4:
- Fix MAINTAINERS file to point to proper mailing list for rtla and rv The mailing list pointed to linux-trace-devel instead of linux-trace-kernel. The former is for the tracing libraries and the latter is for anything in the Linux kernel tree. The wrong mailing list was used because linux-trace-kernel did not exist when rtla and rv were created.
- User events:
. Fix matching of dynamic events to their user events
When user writes to dynamic_events file, a lookup of the registered dynamic events are made, but there were some cases that a match could be incorrectly made.
. Add auto cleanup of user events
Have the user events automatically get removed when the last reference (file descriptor) is closed. This was asked for to prevent leaks of user events hanging around needing admins to clean them up.
. Add persistent logic (but not let user space use it yet)
In some cases, having a persistent user event (one that does not get cleaned up automatically) is useful. But there's still debates about how to expose this to user space. The infrastructure is added, but the API is not.
. Update the selftests
Update the user event selftests to reflect the above changes.
Please pull the latest trace-v6.4-rc6 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace-v6.4-rc6
Tag SHA1: 988f3e958db1ca366d0132c8264c9c1cf063f3e8 Head SHA1: 0113d4615dbf053ae9a7a1e0acbc6652713af01f
Beau Belgrave (7):
tracing/user_events: Remove user_ns walk for groups tracing/user_events: Store register flags on events tracing/user_events: Track refcount consistently via put/get tracing/user_events: Add auto cleanup and future persist flag selftests/user_events: Ensure auto cleanup works as expected selftests/user_events: Adapt dyn_test to non-persist events tracing/user_events: Document auto-cleanup and remove dyn_event refs
Steven Rostedt (Google) (1):
tracing/rv/rtla: Update MAINTAINERS file to point to proper mailing list
sunliming (7):
tracing/user_events: Prevent same name but different args event tracing/user_events: Handle matching arguments that is null from dyn_events
tracing: Modify print_fields() for fields output order tracing/user_events: Fix the incorrect trace record for empty arguments events selftests/user_events: Add ftrace self-test for empty arguments events selftests/user_events: Clear the events after perf self-test selftests/user_events: Add perf self-test for empty arguments events
----
Documentation/trace/user_events.rst | 7 +- MAINTAINERS | 4 +- kernel/trace/trace_events_user.c | 290 +++++++++++++++------- kernel/trace/trace_output.c | 2 +- tools/testing/selftests/user_events/dyn_test.c | 177 ++++++++++--- tools/testing/selftests/user_events/ftrace_test.c | 88 ++++++- tools/testing/selftests/user_events/perf_test.c | 82 ++++++ 7 files changed, 508 insertions(+), 142 deletions(-)
---------------------------
Documentation/trace/user_events.rst +3 -4
@@ -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
MAINTAINERS +2 -2
@@ -17806,7 +17806,7 @@ F: tools/testing/selftests/rtc/ Real-time Linux Analysis (RTLA) tools M: Daniel Bristot de Oliveira <[email protected]> M: Steven Rostedt <[email protected]> -L: [email protected] +L: [email protected] S: Maintained F: Documentation/tools/rtla/ F: tools/tracing/rtla/
@@ -18368,7 +18368,7 @@ F: drivers/infiniband/ulp/rtrs/ RUNTIME VERIFICATION (RV) M: Daniel Bristot de Oliveira <[email protected]> M: Steven Rostedt <[email protected]> -L: [email protected] +L: [email protected] S: Maintained F: Documentation/trace/rv/ F: include/linux/rv.h
kernel/trace/trace_events_user.c +207 -83
527 lines not on this page · raw message
kernel/trace/trace_output.c +1 -1
@@ -847,7 +847,7 @@ static void print_fields(struct trace_iterator *iter, struct trace_event_call *cint ret;void *pos; -list_for_each_entry (field, head, link) { +list_for_each_entry_reverse (field, head, link) {trace_seq_printf (&iter->seq," %s=" , field->name);if (field->offset + field->size > iter->ent_size) {trace_seq_puts (&iter->seq,"<OVERFLOW>" );
tools/testing/selftests/user_events/dyn_test.c +136 -41
211 lines not on this page · raw message
tools/testing/selftests/user_events/ftrace_test.c +77 -11
144 lines not on this page · raw message
tools/testing/selftests/user_events/perf_test.c +82 -0
100 lines not on this page · raw message