bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] perf trace: Fix parallel execution
@ 2025-08-14  7:17 Namhyung Kim
  2025-08-14  7:17 ` [PATCH 1/5] perf trace: use standard syscall tracepoint structs for augmentation Namhyung Kim
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Namhyung Kim @ 2025-08-14  7:17 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Ian Rogers, Kan Liang
  Cc: Jiri Olsa, Adrian Hunter, Peter Zijlstra, Ingo Molnar, LKML,
	linux-perf-users, bpf, Song Liu, Howard Chu

Hello,

This is an attempt to fix a problem Howard reported earlier [1].  Now
perf trace attaches BPF to syscall tracepoints to augment argument as
well as filter out system calls that are not interested.  But it runs
on per-tracepoint basis and can affect other (unrelated) processes too.

So we cannot simply use the return value of BPF for filtering.
Instead, it can generate output for un-augmented arguments and return
values for syscalls it wants, then no need to use tracepoint events in
the perf trace.

This change should not introduce any difference from the users point
of view.  And it should allow multiple perf trace comand run without
affecting each other.  So I updated the related test cases not to run
them exclusively anymore.

The code is also available at 'perf/trace-fix-v1' branch in my tree:

  git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git

Thanks,
Namhyung


[1] https://lore.kernel.org/r/20250529065537.529937-1-howardchu95@gmail.com


Jakub Brnak (1):
  perf trace: use standard syscall tracepoint structs for augmentation

Namhyung Kim (4):
  perf trace: Split unaugmented sys_exit program
  perf trace: Do not return 0 from syscall tracepoint BPF
  perf trace: Remove unused code
  perf test: Remove exclusive tag from perf trace tests

 tools/perf/builtin-trace.c                    | 231 +++++++-----------
 .../tests/shell/trace+probe_vfs_getname.sh    |   2 +-
 tools/perf/tests/shell/trace_summary.sh       |   2 +-
 .../bpf_skel/augmented_raw_syscalls.bpf.c     | 101 ++++----
 tools/perf/util/bpf_skel/perf_trace_u.h       |  14 ++
 tools/perf/util/bpf_skel/vmlinux/vmlinux.h    |  14 ++
 tools/perf/util/bpf_trace_augment.c           |   9 +-
 tools/perf/util/trace_augment.h               |  10 +-
 8 files changed, 196 insertions(+), 187 deletions(-)
 create mode 100644 tools/perf/util/bpf_skel/perf_trace_u.h

-- 
2.51.0.rc1.167.g924127e9c0-goog


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

end of thread, other threads:[~2025-09-05 19:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14  7:17 [PATCH 0/5] perf trace: Fix parallel execution Namhyung Kim
2025-08-14  7:17 ` [PATCH 1/5] perf trace: use standard syscall tracepoint structs for augmentation Namhyung Kim
2025-09-04 21:34   ` Arnaldo Carvalho de Melo
2025-09-05 19:48     ` Namhyung Kim
2025-08-14  7:17 ` [PATCH 2/5] perf trace: Split unaugmented sys_exit program Namhyung Kim
2025-08-14  7:17 ` [PATCH 3/5] perf trace: Do not return 0 from syscall tracepoint BPF Namhyung Kim
2025-08-14  7:17 ` [PATCH 4/5] perf trace: Remove unused code Namhyung Kim
2025-08-14  7:17 ` [PATCH 5/5] perf test: Remove exclusive tag from perf trace tests Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).