mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Kan Liang <kan.liang@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org, bpf@vger.kernel.org,
	Song Liu <song@kernel.org>, Howard Chu <howardchu95@gmail.com>
Subject: [PATCH 0/5] perf trace: Fix parallel execution
Date: Thu, 14 Aug 2025 00:17:49 -0700	[thread overview]
Message-ID: <20250814071754.193265-1-namhyung@kernel.org> (raw)

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


             reply	other threads:[~2025-08-14  7:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14  7:17 Namhyung Kim [this message]
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-09-08 21:00   ` 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250814071754.193265-1-namhyung@kernel.org \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=howardchu95@gmail.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=song@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®