Skip to content

Commit 0258a47

Browse files
anakryikoacmel
authored andcommitted
btf_encoder: Discard CUs after BTF encoding
When doing BTF encoding/deduping, DWARF CUs are never used after BTF encoding is done, so there is no point in wasting memory and keeping them in memory. So discard them immediately. Committer testing: $ pahole -J vmlinux $ ./btfdiff vmlinux $ Signed-off-by: Andrii Nakryiko <[email protected]> Tested-by: Arnaldo Carvalho de Melo <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Andrii Nakryiko <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 3c913e1 commit 0258a47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pahole.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2384,7 +2384,7 @@ static enum load_steal_kind pahole_stealer(struct cu *cu,
23842384
fprintf(stderr, "Encountered error while encoding BTF.\n");
23852385
exit(1);
23862386
}
2387-
return LSK__KEEPIT;
2387+
return LSK__DELETE;
23882388
}
23892389

23902390
if (ctf_encode) {

0 commit comments

Comments
 (0)