libbpf-tools: Fix renaming of the state field of task_struct
authorHengqi Chen <chenhengqi@outlook.com>
Thu, 14 Oct 2021 13:40:45 +0000 (21:40 +0800)
committeryonghong-song <ys114321@gmail.com>
Sat, 16 Oct 2021 00:28:13 +0000 (17:28 -0700)
commit8b350fd51b004d4eddd7caa410e274e2807904f9
treee6ac1ed5688dfe7c8d0315cf86f9accf9ab9e927
parentfb09f596fff3b02ca734a98c237d3483fa7b98e3
libbpf-tools: Fix renaming of the state field of task_struct

Kernel commit 2f064a59a1 ("sched: Change task_struct::state") changes
the name of task_struct::state to task_struct::__state, which breaks
several libbpf tools. Fix them by utilizing the libbpf CO-RE support.

Signed-off-by: Hengqi Chen <chenhengqi@outlook.com>
libbpf-tools/core_fixes.bpf.h [new file with mode: 0644]
libbpf-tools/cpudist.bpf.c
libbpf-tools/offcputime.bpf.c
libbpf-tools/runqlat.bpf.c
libbpf-tools/runqslower.bpf.c