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
..
2026-04-10 15:13:37 -07:00
2026-03-31 09:14:13 -10:00
2026-02-23 11:18:48 -08:00
2026-02-21 01:02:28 -08:00
2026-03-20 12:05:56 +01:00
2026-01-30 15:40:05 +01:00
2026-03-12 11:29:16 +01:00
2026-03-28 13:54:02 +01:00
2026-02-21 20:03:00 -08:00
2026-02-21 17:09:51 -08:00
2026-02-26 09:54:08 -08:00
2026-02-21 17:09:51 -08:00
2026-02-24 11:13:26 -08:00
2026-02-22 08:26:33 -08:00
2026-02-23 19:37:28 +00:00
2026-03-23 13:54:53 +01:00
2026-02-21 17:09:51 -08:00
2026-03-25 09:00:05 -07:00
2026-03-31 14:23:12 -07:00
2026-03-24 23:17:14 +01:00
2026-04-07 16:27:52 -07:00
2026-02-21 20:03:00 -08:00
2025-06-24 20:30:37 +09:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2025-10-22 19:28:06 -04:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2025-12-03 16:53:19 +01:00
2025-07-31 18:23:53 -07:00
2026-01-01 16:39:46 +08:00
2025-11-14 10:01:52 +01:00
2026-02-17 09:46:03 -08:00
2025-09-13 17:32:55 -07:00
2026-02-21 17:09:51 -08:00
2026-03-10 16:01:48 -07:00
2025-11-12 10:00:15 -08:00
2026-01-06 20:52:57 -05:00
2026-02-08 00:13:32 -08:00
2026-02-26 10:45:49 +01:00
2026-02-21 17:09:51 -08:00
2026-03-11 12:01:07 +01:00
2025-10-30 20:10:27 +01:00
2025-08-06 10:23:36 +09:00
2026-02-21 01:02:28 -08:00
2025-11-20 14:03:43 -08:00
2026-01-22 15:58:22 -07:00
2026-02-21 17:09:51 -08:00
2026-02-12 12:13:01 -08:00
2025-11-27 14:24:33 -08:00
2026-01-08 12:43:57 +01:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-01-31 16:16:07 -08:00
2025-08-02 12:01:38 -07:00
2026-02-21 17:09:51 -08:00
2026-03-13 23:15:26 +09:00
2025-11-27 15:44:53 +01:00
2025-11-27 14:24:42 -08:00
2026-02-26 10:45:49 +01:00
2026-01-05 16:43:34 +01:00
2026-02-27 22:00:08 +01:00
2025-11-14 13:10:38 +01:00
2026-02-27 22:00:11 +01:00
2026-02-21 20:03:00 -08:00
2026-02-03 08:21:26 -08:00
2026-02-21 20:03:00 -08:00
2025-11-11 10:01:32 +01:00
2026-02-10 11:39:30 +01:00
2025-11-04 08:30:50 +01:00
2026-02-21 01:02:28 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-23 11:19:19 +01:00
2026-02-21 17:09:51 -08:00
2025-11-12 10:00:13 -08:00
2026-02-21 17:09:51 -08:00
2026-01-05 16:43:33 +01:00
2025-11-19 18:06:50 +01:00
2025-06-13 08:47:20 +02:00
2025-09-17 16:25:41 +02:00
2026-02-21 17:09:51 -08:00
2025-07-01 15:02:03 +02:00
2026-01-22 11:11:17 +01:00
2026-02-12 19:17:44 -08:00
2026-03-26 09:32:19 +01:00
2025-10-29 10:29:54 +01:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-01-26 19:07:13 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 01:02:28 -08:00
2026-02-22 08:26:33 -08:00
2025-11-11 10:01:32 +01:00
2025-09-29 11:20:29 -07:00
2026-02-21 17:09:51 -08:00
2026-02-12 12:13:01 -08:00
2026-02-21 17:09:51 -08:00
2025-07-31 11:28:03 -04:00
2026-02-08 00:13:35 -08:00
2026-02-08 00:13:34 -08:00
2026-03-05 07:27:48 -10:00
2026-03-25 05:51:02 -10:00