aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/clang-tools/gen_compile_commands.py
diff options
context:
space:
mode:
authorNamhyung Kim <[email protected]>2022-06-24 23:13:08 +0000
committerArnaldo Carvalho de Melo <[email protected]>2022-06-28 14:41:26 +0000
commitd6838ec44b4513280a3f43fcc402e246d543fb53 (patch)
treecb12e505d57794c6937ffdd3ef28524e2e614e8c /scripts/clang-tools/gen_compile_commands.py
parentMerge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost (diff)
downloadkernel-d6838ec44b4513280a3f43fcc402e246d543fb53.tar.gz
kernel-d6838ec44b4513280a3f43fcc402e246d543fb53.zip
perf offcpu: Fix build failure on old kernels
Old kernels have a 'struct task_struct' which contains a "state" field and newer kernels have "__state" instead. While the get_task_state() in the BPF code handles that in some way, it assumed the current kernel has the new definition and it caused a build error on old kernels. We should not assume anything and access them carefully. Do not use 'task struct' directly access it instead using new and old definitions in a row. Fixes: edc41a1099c2d08c ("perf record: Enable off-cpu analysis with BPF") Reported-by: Ian Rogers <[email protected]> Signed-off-by: Namhyung Kim <[email protected]> Cc: Blake Jones <[email protected]> Cc: Hao Luo <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Milian Wolff <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Song Liu <[email protected]> Cc: [email protected] Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'scripts/clang-tools/gen_compile_commands.py')
0 files changed, 0 insertions, 0 deletions