Eduard Zingerman
2c167d9177
bpf: change logging scheme for live stack analysis
Instead of breadcrumbs like:
(d2,cs15) frame 0 insn 18 +live -16
(d2,cs15) frame 0 insn 17 +live -16
Print final accumulated stack use/def data per-func_instance
per-instruction. printed func_instance's are ordered by callsite and
depth. For example:
stack use/def subprog#0 shared_instance_must_write_overwrite (d0,cs0):
0: (b7) r1 = 1
1: (7b) *(u64 *)(r10 -8) = r1 ; def: fp0-8
2: (7b) *(u64 *)(r10 -16) = r1 ; def: fp0-16
3: (bf) r1 = r10
4: (07) r1 += -8
5: (bf) r2 = r10
6: (07) r2 += -16
7: (85) call pc+7 ; use: fp0-8 fp0-16
8: (bf) r1 = r10
9: (07) r1 += -16
10: (bf) r2 = r10
11: (07) r2 += -8
12: (85) call pc+2 ; use: fp0-8 fp0-16
13: (b7) r0 = 0
14: (95) exit
stack use/def subprog#1 forwarding_rw (d1,cs7):
15: (85) call pc+1 ; use: fp0-8 fp0-16
16: (95) exit
stack use/def subprog#1 forwarding_rw (d1,cs12):
15: (85) call pc+1 ; use: fp0-8 fp0-16
16: (95) exit
stack use/def subprog#2 write_first_read_second (d2,cs15):
17: (7a) *(u64 *)(r1 +0) = 42
18: (79) r0 = *(u64 *)(r2 +0) ; use: fp0-8 fp0-16
19: (95) exit
For groups of three or more consecutive stack slots, abbreviate as
follows:
25: (85) call bpf_loop#181 ; use: fp2-8..-512 fp1-8..-512 fp0-8..-512
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20260410-patch-set-v4-10-5d4eecb343db@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2026-04-10 15:13:37 -07:00
..
2025-07-26 21:03:04 +02:00
2026-02-27 15:39:00 -08:00
2026-04-10 12:10:06 -07:00
2026-02-27 15:39:00 -08:00
2026-02-06 14:47:59 -08:00
2026-02-06 14:47:59 -08:00
2026-02-27 15:39:00 -08:00
2026-02-21 17:09:51 -08:00
2026-03-19 12:14:28 -07:00
2025-08-18 15:11:02 +02:00
2025-06-18 18:50:14 -07:00
2025-12-21 10:56:33 -08:00
2026-04-07 07:57:07 -07:00
2026-02-21 17:09:51 -08:00
2026-02-06 14:47:59 -08:00
2024-08-30 08:55:26 -07:00
2024-08-30 08:55:26 -07:00
2026-03-26 13:53:56 -07:00
2026-01-27 09:05:54 -08:00
2026-02-21 17:09:51 -08:00
2026-04-03 08:34:36 -07:00
2026-04-08 18:09:56 -07:00
2026-03-03 08:37:21 -08:00
2026-01-02 12:04:28 -08:00
2026-02-21 17:09:51 -08:00
2026-03-24 15:17:20 -07:00
2025-11-05 17:53:23 -08:00
2021-09-02 14:49:23 +02:00
2024-11-12 17:13:46 -08:00
2025-12-09 23:48:34 -08:00
2026-04-05 18:37:32 -07:00
2026-04-07 12:24:49 -07:00
2026-02-21 17:09:51 -08:00
2025-09-18 19:10:20 -07:00
2024-11-01 11:08:32 -07:00
2025-07-16 18:34:42 -07:00
2026-04-10 15:13:37 -07:00
2026-04-05 18:45:05 -07:00
2026-04-10 15:01:55 -07:00
2026-02-27 15:39:00 -08:00
2026-04-03 08:34:36 -07:00
2024-08-13 15:58:17 -07:00
2023-12-04 17:50:26 -08:00
2026-01-02 12:04:28 -08:00
2026-04-07 12:24:49 -07:00
2021-11-07 11:54:51 -08:00
2023-10-06 17:11:20 -07:00
2026-02-21 01:02:28 -08:00
2026-04-09 13:24:32 -07:00
2025-03-19 08:03:05 -07:00
2025-03-19 08:03:05 -07:00
2025-07-16 18:34:42 -07:00
2025-04-10 12:51:10 -07:00
2026-01-02 14:31:59 -08:00
2024-11-13 13:52:45 -08:00
2024-08-30 08:55:26 -07:00
2024-08-30 08:57:47 -07:00
2026-01-16 14:50:00 -08:00
2026-02-12 12:13:01 -08:00
2025-03-19 08:03:05 -07:00
2025-12-03 16:54:54 -08:00
2026-02-03 10:41:16 -08:00
2026-04-07 12:24:49 -07:00
2025-07-29 12:15:39 -07:00
2026-04-10 12:05:16 -07:00
2026-02-21 01:02:28 -08:00
2026-03-24 08:45:29 -07:00
2026-02-21 01:02:28 -08:00
2026-03-03 15:13:51 -08:00
2026-04-10 15:13:20 -07:00