Skip to content

Commit 8f283fb

Browse files
captain5050acmel
authored andcommitted
perf trace: Disable syscall augmentation with record
Syscall augmentation is causing samples not to be written to the perf.data file with "perf trace record". Disabling augmentation is sub-optimal, but it beats having a totally broken perf trace record. Closes: https://lore.kernel.org/lkml/CAP-5=fV9Gd1Teak+EOcUSxe13KqSyfZyPNagK97GbLiOQRgGaw@mail.gmail.com/ Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20240216172357.65037-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 7b6dd7a commit 8f283fb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tools/perf/builtin-trace.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4883,6 +4883,11 @@ int cmd_trace(int argc, const char **argv)
48834883
if (!trace.trace_syscalls)
48844884
goto skip_augmentation;
48854885

4886+
if ((argc >= 1) && (strcmp(argv[0], "record") == 0)) {
4887+
pr_debug("Syscall augmentation fails with record, disabling augmentation");
4888+
goto skip_augmentation;
4889+
}
4890+
48864891
trace.skel = augmented_raw_syscalls_bpf__open();
48874892
if (!trace.skel) {
48884893
pr_debug("Failed to open augmented syscalls BPF skeleton");

0 commit comments

Comments
 (0)