summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/lists.py
diff options
context:
space:
mode:
authorYonghong Song <yonghong.song@linux.dev>2025-01-18 22:20:29 +0300
committerAlexei Starovoitov <ast@kernel.org>2025-01-20 20:46:10 +0300
commit0c35ca252a7dea61f0731e99d695492176862e2c (patch)
treea7e2aad21d76b996bdf0bb8fc99f1727b42d0457 /scripts/gdb/linux/lists.py
parentaefaa4313b5083427781f9e3e0cc7b5ce5cb4df0 (diff)
downloadlinux-0c35ca252a7dea61f0731e99d695492176862e2c.tar.xz
bpf: Remove 'may_goto 0' instruction in opt_remove_nops()
Since 'may_goto 0' insns are actually no-op, let us remove them. Otherwise, verifier will generate code like /* r10 - 8 stores the implicit loop count */ r11 = *(u64 *)(r10 -8) if r11 == 0x0 goto pc+2 r11 -= 1 *(u64 *)(r10 -8) = r11 which is the pure overhead. The following code patterns (from the previous commit) are also handled: may_goto 2 may_goto 1 may_goto 0 With this commit, the above three 'may_goto' insns are all eliminated. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20250118192029.2124584-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/lists.py')
0 files changed, 0 insertions, 0 deletions