mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT PULL] tracing: Updates for v7.4
@ 2026-10-24  1:09 Steven Rostedt
  0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2026-10-24  1:09 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: LKML, Masami Hiramatsu, Mathieu Desnoyers,
	Adrián García Casado, Chen Jun, David Carlier,
	Donggeun Yoo, Haoran Wang, Kyle Zeng, Lee Jones,
	Thomas Weißschuh, Vincent Donnefort


Linus,

[ Sorry for the late pull request, I was waiting for some last minute fixes ]

tracing updates for v7.4:

- Add "within" to filter logic

  Add a way to trace events by what function they fall in.

  echo 'within == "vfs_read" > events/sched/sched_switch/filter

  Will only trigger sched_switch events that happen within the vfs_read
  function. It uses a stacktrace at the event and checks if any entry is
  within the specified function and if so, it prints the event.

- Remove a duplicate definition of ftrace_set_clr_event() from the header

- Do not have ftrace_set_clr_event() modify its input buffer

  Have the buffer passed into ftrace_set_clr_event() to be const char * and
  not allow modifications to it that might cause side effects.

- Add kunit tests for ftrace_parse_event_string()

- Add filter argument to __ftrace_set_clr_event()

  Make it possible to set a filter on an event at the same time it is
  enabled.

- Add event filtering logic to the kernel command line

  To allow filtering events on boot, allow filtering to be specified on the
  kernel command line when enabling events.

- Rename "ring_buffer_size()" to "ring_buffer_capacity()"

  "size" refers to how much is allocated whereas the actual return value is
  the amount of available data in the ring buffer minus its meta data.

- Rename "trace_array_entries" to "trace_array_capacity"

  There's several functions that use "entries" and returns the amount of
  data that that is usable. "entries" should be only for the number of
  events, not the amount of data.

- Print the histogram "bucket" size as unsigned.

  If a bucket size is LONG_MAX, then it shows up as a negative number.

- Show bucket size in output of histograms

  The output of what the histogram is shown doesn't show the size of the
  buckets when buckets are used. The output should be the same as the input
  and since specifying buckets without a size is an invalid command, the
  output to display what was entered should also show the size.

- Fix stacktrace modifier output

  Only show the stacktrace modifier when it was specified in creation.

- Unregister filed variable histograms when the command fails

  If one histogram references a variable of another histogram it registers
  that other histogram. But if the first histogram fails in setup after it
  registered the other histogram it doesn't unregister it. Have the first
  histogram add the reference to the other histogram so the failure clean up
  will unregister the second histogram too.

- Fix 64-bit signed histogram fields on 32-bit kernels

  A fix to convert char * to u64 with added casting also incorrectly added
  an intermediate cast to convert a long value to u64 which ended up
  truncating the upper 32 bits for 32-bit kernels. Remove the intermediate
  typecast.

- Print signed histogram keys as signed

  Histogram keys were being printed as unsigned and with signed keys it was
  giving the wrong output.

- Use copy_from_user() and not __copy_from_user() in syscall tracing

  The syscall tracing incorrectly was using __copy_from_user() which could
  be an issue if the system trusts perf doing the trace.

- Take trace_types_lock when recording a new module in persistent buffer

  When a new module is loaded, the persistent ring buffer saves it in its
  persistent memory. All the trace_arrays are iterated looking for any
  persistent buffer to add the module to. But it did not hold the
  trace_types_lock meaning a trace_array could be added or removed while
  iterating the list.

- Only create tracepoint guest_halt_poll_ns when it is used

  The tracepoint guest_halt_poll_ns is defined in the power management code
  but it is only used when CONFIG_CPU_IDLE_GOV_HALTPOLL is enabled. This
  wastes memory when that config isn't enabled so wrap the tracepoint around
  that as well.

- Handle empty fields for events in trace_event_get_offsets()

  The user events could have empty fields and this causes
  trace_event_get_offsets() to crash as it expects events to always have
  fields. Make the function handle events with no fields.

- Reject incomplete event filter expressions

  If a filter has an incomplete expression (common_pid == 1111 || ), it will
  cause a out-of-bounds bug. Have the predicate_parse() only process the
  expression if it is complete.


Please pull the latest trace-v7.4 tree, which can be found at:


  git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace-v7.4

Tag SHA1: 528d55aeb09e34f35cc716fe770fdda13a3014a9
Head SHA1: 1fdc4164e488916402badddbb1f51e9380dabb91


Adrián García Casado (1):
      tracing/osnoise: Add __printf attribute to osnoise_print()

Chen Jun (1):
      tracing: Add "within" filter for call-stack-based event filtering

David Carlier (2):
      tracing: Hold trace_types_lock when updating modules in persistent instances
      tracing: Hold trace_types_lock when resetting last boot data from readers

Donggeun Yoo (8):
      tracing: Print the bucket size as unsigned
      tracing: Add the bucket size to expr_field_str()
      tracing: Only report the stacktrace modifier on a real field
      tracing: Unregister field variable histograms when the command fails
      tracing: Clamp the printed end of a histogram bucket at U64_MAX
      tracing: Fix 64-bit and signed histogram fields on 32-bit kernels
      tracing: Print a signed histogram key as signed
      tracing: Save the event file instead of the compatible histogram

Haoran Wang (2):
      tracing/syscalls: Use copy_from_user for the faultable syscall buffer
      tracing: Guard trace_event_get_offsets() against an empty fields list

Kyle Zeng (1):
      tracing: Reject incomplete event filter expressions

Lee Jones (1):
      tracing/histograms: Verify event_call identity when updating synth_event refcount

Steven Rostedt (2):
      tracnig: Add proper error message for glob use with "within" filter
      cpuidle: haltpoll: Only define guest_halt_poll_ns tracepoint when used

Thomas Weißschuh (6):
      tracing: Remove duplicate declaration of ftrace_set_clr_event()
      tracing: Stop modifying the input buffer in ftrace_set_clr_event()
      tracing: Split the event string parsing logic into a dedicated function
      tracing: Add a test for ftrace_parse_event_string()
      tracing: Add a filter argument to __ftrace_set_clr_event()
      tracing: Parse filter from boot event string

Vincent Donnefort (3):
      ring-buffer: Rename ring_buffer_size() to ring_buffer_capacity()
      tracing: Rename trace_array::entries to capacity
      tracing: Rename tracing_entries_fops to tracing_capacity_fops

----
 Documentation/admin-guide/kernel-parameters.txt    |   9 +-
 Documentation/trace/events.rst                     |  17 +++
 Documentation/trace/histogram.rst                  |   3 +
 include/linux/ring_buffer.h                        |   2 +-
 include/linux/trace_events.h                       |   3 +-
 include/trace/events/power.h                       |   3 +
 kernel/trace/Kconfig                               |   8 ++
 kernel/trace/Makefile                              |   1 +
 kernel/trace/ring_buffer.c                         |  13 +-
 kernel/trace/trace.c                               |  72 ++++++-----
 kernel/trace/trace.h                               |  13 +-
 kernel/trace/trace_boot.c                          |   2 +-
 kernel/trace/trace_events.c                        | 132 +++++++++++++--------
 kernel/trace/trace_events_filter.c                 |  50 +++++++-
 kernel/trace/trace_events_hist.c                   |  61 ++++++----
 kernel/trace/trace_events_synth.c                  |  10 ++
 kernel/trace/trace_events_test.c                   | 122 +++++++++++++++++++
 kernel/trace/trace_osnoise.c                       |   1 +
 kernel/trace/trace_snapshot.c                      |  14 +--
 kernel/trace/trace_synth.h                         |   1 +
 kernel/trace/trace_syscalls.c                      |   2 +-
 .../test.d/filter/event-filter-incomplete.tc       |  24 ++++
 22 files changed, 440 insertions(+), 123 deletions(-)
 create mode 100644 kernel/trace/trace_events_test.c
 create mode 100644 tools/testing/selftests/ftrace/test.d/filter/event-filter-incomplete.tc
---------------------------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-24  1:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-24  1:09 [GIT PULL] tracing: Updates for v7.4 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®