On 3/1/20 12:10 AM, Andrii Nakryiko wrote:
In addition to btf_trace_##call typedefs to func protos, generate a struct raw_tp_##call with memory layout directly usable from BPF programs to access raw tracepoint arguments. This allows for user BPF programs to directly use such structs for their raw tracepoint BPF programs when using vmlinux.h, without having to manually copy/paste and maintain raw tracepoint argument declarations. Additionally, due to CO-RE and preserve_access_index attribute, such structs are relocatable, all the CO-RE relocations and field existence checks are available automatically to such BPF programs. runqslower example in next patch will demonstrate this usage. Signed-off-by: Andrii Nakryiko <andriin@xxxxxx>
Acked-by: Yonghong Song <yhs@xxxxxx>