Skip to content

perf trace: Fix parallel execution

Namhyung Kim bpf linux-perf-users lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5perf trace: use standard syscall tracepoint structs for augmentationtools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c tools/perf/util/bpf_skel/vmlinux/vmlinux.h+40 -363 replies
2/5perf trace: Split unaugmented sys_exit programtools/perf/builtin-trace.c tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c tools/perf/util/bpf_trace_augment.c +1 more+27 -80 replies
3/5perf trace: Do not return 0 from syscall tracepoint BPFtools/perf/builtin-trace.c tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c tools/perf/util/bpf_skel/perf_trace_u.h+133 -370 replies
4/5perf trace: Remove unused codetools/perf/builtin-trace.c+0 -1100 replies
5/5perf test: Remove exclusive tag from perf trace teststools/perf/tests/shell/trace+probe_vfs_getname.sh tools/perf/tests/shell/trace_summary.sh+2 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] perf trace: Fix parallel execution

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/[email protected]

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
Signature · 1 line
2.51.0.rc1.167.g924127e9c0-goog