mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH 0/5] tracing/filters: filtering event fields with a cpumask
@ 2023-06-09 15:03 Valentin Schneider
  2023-06-09 15:03 ` [RFC PATCH 1/5] tracing/filters: Dynamically allocate filter_pred.regex Valentin Schneider
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Valentin Schneider @ 2023-06-09 15:03 UTC (permalink / raw)
  To: linux-kernel, linux-trace-kernel, linux-doc
  Cc: Steven Rostedt, Masami Hiramatsu, Jonathan Corbet, Juri Lelli,
	Daniel Bristot de Oliveira, Marcelo Tosatti, Leonardo Bras,
	Frederic Weisbecker

Hi folks,

In the context of CPU isolation / NOHZ_FULL interference investigation, we now
have the ipi_send_cpu and ipi_send_cpumask events. However, enabling these
events without any filtering can yield pretty massive traces with a lot of
uninteresting or irrelevant data (e.g. everything targeting housekeeping CPUs).

This series is about adding event filtering via a user-provided cpumask. This
enables filtering using cpumask fields (e.g. ipi_send_cpumask) and extends this
to scalar and the local CPU common fields.

With this, it becomes fairly easy to trace events both happening on and
targeting CPUs of interest, e.g.:

  trace-cmd record -e 'sched_switch' -f "CPU & MASK{$ISOLATED_CPUS}"         \
		   -e 'sched_wakeup' -f "target_cpu & MASK{$ISOLATED_CPUS}"  \
		   -e 'ipi_send_cpu' -f "cpu & MASK{$ISOLATED_CPUS}"         \
		   -e 'ipi_send_cpumask' -f "cpumask & MASK{$ISOLATED_CPUS}" \
		   hackbench

The MASK{} thing is a bit crude but seems to work well enough without break^C
overhauling the predicate parsing logic.

Cheers,
Valentin

Valentin Schneider (5):
  tracing/filters: Dynamically allocate filter_pred.regex
  tracing/filters: Enable filtering a cpumask field by another cpumask
  tracing/filters: Enable filtering a scalar field by a cpumask
  tracing/filters: Enable filtering the CPU common field by a cpumask
  tracing/filters: Document cpumask filtering

 Documentation/trace/events.rst     |  14 ++
 include/linux/trace_events.h       |   1 +
 kernel/trace/trace_events_filter.c | 228 +++++++++++++++++++++++++----
 3 files changed, 216 insertions(+), 27 deletions(-)

--
2.31.1


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

end of thread, other threads:[~2023-06-09 15:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-09 15:03 [RFC PATCH 0/5] tracing/filters: filtering event fields with a cpumask Valentin Schneider
2023-06-09 15:03 ` [RFC PATCH 1/5] tracing/filters: Dynamically allocate filter_pred.regex Valentin Schneider
2023-06-09 15:03 ` [RFC PATCH 2/5] tracing/filters: Enable filtering a cpumask field by another cpumask Valentin Schneider
2023-06-09 15:03 ` [RFC PATCH 3/5] tracing/filters: Enable filtering a scalar field by a cpumask Valentin Schneider
2023-06-09 15:03 ` [RFC PATCH 4/5] tracing/filters: Enable filtering the CPU common " Valentin Schneider
2023-06-09 15:03 ` [RFC PATCH 5/5] tracing/filters: Document cpumask filtering Valentin Schneider

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®