diff options
author | Howard Chu <howardchu95@gmail.com> | 2024-08-25 00:33:20 +0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-09-10 09:52:20 -0300 |
commit | a68fd6a6cdd309bb51c72df4a39f49aa408728d0 (patch) | |
tree | 921b91efcbf2e86d3dafcd9875cf22dcc2db156b /lib/locking-selftest-rsem.h | |
parent | b257fac12f38d7f503b932313d704cee21092350 (diff) | |
download | linux-stable-a68fd6a6cdd309bb51c72df4a39f49aa408728d0.tar.gz linux-stable-a68fd6a6cdd309bb51c72df4a39f49aa408728d0.tar.bz2 linux-stable-a68fd6a6cdd309bb51c72df4a39f49aa408728d0.zip |
perf trace: Collect augmented data using BPF
Include trace_augment.h for TRACE_AUG_MAX_BUF, so that BPF reads
TRACE_AUG_MAX_BUF bytes of buffer maximum.
Determine what type of argument and how many bytes to read from user space, us ing the
value in the beauty_map. This is the relation of parameter type and its corres ponding
value in the beauty map, and how many bytes we read eventually:
string: 1 -> size of string (till null)
struct: size of struct -> size of struct
buffer: -1 * (index of paired len) -> value of paired len (maximum: TRACE_AUG_ MAX_BUF)
After reading from user space, we output the augmented data using
bpf_perf_event_output().
If the struct augmenter, augment_sys_enter() failed, we fall back to
using bpf_tail_call().
I have to make the payload 6 times the size of augmented_arg, to pass the
BPF verifier.
Signed-off-by: Howard Chu <howardchu95@gmail.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240815013626.935097-10-howardchu95@gmail.com
Link: https://lore.kernel.org/r/20240824163322.60796-7-howardchu95@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'lib/locking-selftest-rsem.h')
0 files changed, 0 insertions, 0 deletions