diff mbox series

[dwarves,07/11] btf_encoder: discard CUs after BTF encoding

Message ID 20200930042742.2525310-8-andriin@fb.com (mailing list archive)
State Not Applicable
Headers show
Series Switch BTF loading and encoding to libbpf APIs | expand

Commit Message

Andrii Nakryiko Sept. 30, 2020, 4:27 a.m. UTC
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.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
---
 pahole.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/pahole.c b/pahole.c
index ed87529ce65d..745f77ffe430 100644
--- a/pahole.c
+++ b/pahole.c
@@ -2368,7 +2368,7 @@  static enum load_steal_kind pahole_stealer(struct cu *cu,
 			fprintf(stderr, "Encountered error while encoding BTF.\n");
 			exit(1);
 		}
-		return LSK__KEEPIT;
+		return LSK__DELETE;
 	}
 
 	if (ctf_encode) {