Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf trace: Tidy comments related to BPF + syscall augmentation

Now tools/perf/examples/bpf/augmented_syscalls.c is
tools/perf/util/bpf_skel/augmented_syscalls.bpf.c and not enabled as a
BPF event, tidy the comments to reflect this.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Carsten Haitzler <carsten.haitzler@arm.com>
Cc: Eduard Zingerman <eddyz87@gmail.com>
Cc: Fangrui Song <maskray@google.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Tom Rix <trix@redhat.com>
Cc: Wang Nan <wangnan0@huawei.com>
Cc: Wang ShaoBo <bobo.shaobowang@huawei.com>
Cc: Yang Jihong <yangjihong1@huawei.com>
Cc: Yonghong Song <yhs@fb.com>
Cc: YueHaibing <yuehaibing@huawei.com>
Cc: bpf@vger.kernel.org
Cc: llvm@lists.linux.dev
Link: https://lore.kernel.org/r/20230810184853.2860737-5-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
cd2cece6 5056c99e

+7 -16
+7 -8
tools/perf/trace/beauty/beauty.h
··· 67 67 /** 68 68 * augmented_arg: extra payload for syscall pointer arguments 69 69 70 - * If perf_sample->raw_size is more than what a syscall sys_enter_FOO puts, 71 - * then its the arguments contents, so that we can show more than just a 70 + * If perf_sample->raw_size is more than what a syscall sys_enter_FOO puts, then 71 + * its the arguments contents, so that we can show more than just a 72 72 * pointer. This will be done initially with eBPF, the start of that is at the 73 - * tools/perf/examples/bpf/augmented_syscalls.c example for the openat, but 74 - * will eventually be done automagically caching the running kernel tracefs 75 - * events data into an eBPF C script, that then gets compiled and its .o file 76 - * cached for subsequent use. For char pointers like the ones for 'open' like 77 - * syscalls its easy, for the rest we should use DWARF or better, BTF, much 78 - * more compact. 73 + * tools/perf/util/bpf_skel/augmented_syscalls.bpf.c that will eventually be 74 + * done automagically caching the running kernel tracefs events data into an 75 + * eBPF C script, that then gets compiled and its .o file cached for subsequent 76 + * use. For char pointers like the ones for 'open' like syscalls its easy, for 77 + * the rest we should use DWARF or better, BTF, much more compact. 79 78 * 80 79 * @size: 8 if all we need is an integer, otherwise all of the augmented arg. 81 80 * @int_arg: will be used for integer like pointer contents, like 'accept's 'upeer_addrlen'
-8
tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
··· 2 2 /* 3 3 * Augment the raw_syscalls tracepoints with the contents of the pointer arguments. 4 4 * 5 - * Test it with: 6 - * 7 - * perf trace -e tools/perf/examples/bpf/augmented_raw_syscalls.c cat /etc/passwd > /dev/null 8 - * 9 5 * This exactly matches what is marshalled into the raw_syscall:sys_enter 10 6 * payload expected by the 'perf trace' beautifiers. 11 - * 12 - * For now it just uses the existing tracepoint augmentation code in 'perf 13 - * trace', in the next csets we'll hook up these with the sys_enter/sys_exit 14 - * code that will combine entry/exit in a strace like way. 15 7 */ 16 8 17 9 #include <linux/bpf.h>