mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT PULL] tracing: Updates for v6.14
@ 2025-01-20  0:29 Steven Rostedt
  2025-01-20 17:45 ` Steven Rostedt
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2025-01-20  0:29 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: LKML, Masami Hiramatsu, Mathieu Desnoyers, Alice Ryhl


Linus,

tracing updates for v6.14:

- Cleanup with guard() and free() helpers

  There were several places in the code that had a lot of "goto out" in the
  error paths to either unlock a lock or free some memory that was
  allocated. But this is error prone. Convert the code over to use the
  guard() and free() helpers that let the compiler unlock locks or free
  memory when the function exits.

- Update the Rust tracepoint code to use the C code too

  There was some duplication of the tracepoint code for Rust that did the
  same logic as the C code. Add a helper that makes it possible for both
  algorithms to use the same logic in one place.

- Add poll to trace event hist files

  It is useful to know when an event is triggered, or even with some
  filtering. Since hist files of events get updated when active and the
  event is triggered, allow applications to poll the hist file and wake up
  when an event is triggered. This will let the application know that the
  event it is waiting for happened.

- Add :mod: command to enable events for current or future modules

  The function tracer already has a way to enable functions to be traced in
  modules by writing ":mod:<module>" into set_ftrace_filter. That will
  enable either all the functions for the module if it is loaded, or if it
  is not, it will cache that command, and when the module is loaded that
  matches <module>, its functions will be enabled. This also allows init
  functions to be traced. But currently events do not have that feature.

  Add the command where if ':mod:<module>' is written into set_event, then
  either all the modules events are enabled if it is loaded, or cache it so
  that the module's events are enabled when it is loaded. This also works
  from the kernel command line, where "trace_event=:mod:<module>", when the
  module is loaded at boot up, its events will be enabled then.


Please pull the latest trace-v6.14 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace-v6.14

Tag SHA1: 5a6f4c61533ca7dd9479a01b3bb06b929ff99131
Head SHA1: 542079b4b12e89f82c8a689b6e9b119ab7d52018


Alice Ryhl (1):
      tracepoint: Reduce duplication of __DO_TRACE_CALL

Masami Hiramatsu (Google) (3):
      tracing/hist: Add poll(POLLIN) support on hist file
      tracing/hist: Support POLLPRI event for poll on histogram
      selftests/tracing: Add hist poll() support test

Steven Rostedt (18):
      tracing: Switch trace.c code over to use guard()
      tracing: Return -EINVAL if a boot tracer tries to enable the mmiotracer at boot
      tracing: Have event_enable_write() just return error on error
      tracing: Simplify event_enable_func() goto out_free logic
      tracing: Simplify event_enable_func() goto_reg logic
      tracing: Switch trace_events.c code over to use guard()
      tracing: Switch trace_events_hist.c code over to use guard()
      tracing: Switch trace_events_trigger.c code over to use guard()
      tracing: Switch trace_events_filter.c code over to use guard()
      tracing: Switch trace_events_synth.c code over to use guard()
      tracing: Switch trace_osnoise.c code over to use guard() and __free()
      tracing: Switch trace_stack.c code over to use guard()
      tracing: Switch trace_stat.c code over to use guard()
      tracing/string: Create and use __free(argv_free) in trace_dynevent.c
      tracing: Fix using ret variable in tracing_set_tracer()
      tracing: Add :mod: command to enabled module events
      tracing: Cache ":mod:" events for modules not loaded yet
      selftests/ftrace: Add test that tests event :mod: commands

----
 Documentation/admin-guide/kernel-parameters.txt    |   8 +
 Documentation/trace/events.rst                     |  24 ++
 include/linux/string.h                             |   3 +
 include/linux/trace_events.h                       |  14 +
 include/linux/tracepoint.h                         |  20 +-
 kernel/trace/ftrace.c                              |  17 -
 kernel/trace/trace.c                               | 297 ++++++-------
 kernel/trace/trace.h                               |  12 +
 kernel/trace/trace_dynevent.c                      |  23 +-
 kernel/trace/trace_events.c                        | 465 ++++++++++++++++-----
 kernel/trace/trace_events_filter.c                 |  23 +-
 kernel/trace/trace_events_hist.c                   | 119 +++++-
 kernel/trace/trace_events_synth.c                  |  17 +-
 kernel/trace/trace_events_trigger.c                |  67 +--
 kernel/trace/trace_osnoise.c                       |  40 +-
 kernel/trace/trace_stack.c                         |   6 +-
 kernel/trace/trace_stat.c                          |  26 +-
 tools/testing/selftests/ftrace/Makefile            |   2 +
 tools/testing/selftests/ftrace/poll.c              |  74 ++++
 .../selftests/ftrace/test.d/event/event-mod.tc     | 191 +++++++++
 .../ftrace/test.d/trigger/trigger-hist-poll.tc     |  74 ++++
 21 files changed, 1047 insertions(+), 475 deletions(-)
 create mode 100644 tools/testing/selftests/ftrace/poll.c
 create mode 100644 tools/testing/selftests/ftrace/test.d/event/event-mod.tc
 create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-poll.tc
---------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] tracing: Updates for v6.14
  2025-01-20  0:29 [GIT PULL] tracing: Updates for v6.14 Steven Rostedt
@ 2025-01-20 17:45 ` Steven Rostedt
  2025-01-21 23:20   ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2025-01-20 17:45 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: LKML, Masami Hiramatsu, Mathieu Desnoyers, Alice Ryhl

On Sun, 19 Jan 2025 19:29:02 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> - Add :mod: command to enable events for current or future modules
> 
>   The function tracer already has a way to enable functions to be traced in
>   modules by writing ":mod:<module>" into set_ftrace_filter. That will
>   enable either all the functions for the module if it is loaded, or if it
>   is not, it will cache that command, and when the module is loaded that
>   matches <module>, its functions will be enabled. This also allows init
>   functions to be traced. But currently events do not have that feature.
> 
>   Add the command where if ':mod:<module>' is written into set_event, then
>   either all the modules events are enabled if it is loaded, or cache it so
>   that the module's events are enabled when it is loaded. This also works
>   from the kernel command line, where "trace_event=:mod:<module>", when the
>   module is loaded at boot up, its events will be enabled then.

This change added a "#if CONFIG_MODULES" when it should have been a
"#ifdef CONFIG_MODULES". The kernel robot reported this over a week ago and
I fixed it locally, but got distracted and never sent out the fix nor
tested nor applied it.

I'm doing that now, so you can hold off on this pull request.

Thanks,

-- Steve

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] tracing: Updates for v6.14
  2025-01-20 17:45 ` Steven Rostedt
@ 2025-01-21 23:20   ` Linus Torvalds
  2025-01-21 23:28     ` Steven Rostedt
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2025-01-21 23:20 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Masami Hiramatsu, Mathieu Desnoyers, Alice Ryhl

On Mon, 20 Jan 2025 at 09:45, Steven Rostedt <rostedt@goodmis.org> wrote:
>
> I'm doing that now, so you can hold off on this pull request.

Well, I also am holding off on your v2 pull request due to the
allocation size issue.

So I've pulled the ring-buffer, the ftrace and the sorttable branches,
but not the tracing updates.

            Linus

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] tracing: Updates for v6.14
  2025-01-21 23:20   ` Linus Torvalds
@ 2025-01-21 23:28     ` Steven Rostedt
  0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2025-01-21 23:28 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: LKML, Masami Hiramatsu, Mathieu Desnoyers, Alice Ryhl

On Tue, 21 Jan 2025 15:20:42 -0800
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Mon, 20 Jan 2025 at 09:45, Steven Rostedt <rostedt@goodmis.org> wrote:
> >
> > I'm doing that now, so you can hold off on this pull request.  
> 
> Well, I also am holding off on your v2 pull request due to the
> allocation size issue.

I'm currently running that patch (and a minor output fix patch) through my
test suite. I'll be sending a v3 tomorrow.

> 
> So I've pulled the ring-buffer, the ftrace and the sorttable branches,
> but not the tracing updates.

Thanks,

-- Steve


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-01-21 23:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-20  0:29 [GIT PULL] tracing: Updates for v6.14 Steven Rostedt
2025-01-20 17:45 ` Steven Rostedt
2025-01-21 23:20   ` Linus Torvalds
2025-01-21 23:28     ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®