[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1430391165-30267-21-git-send-email-wangnan0@huawei.com>
Date: Thu, 30 Apr 2015 10:52:43 +0000
From: Wang Nan <wangnan0@...wei.com>
To: <ast@...mgrid.com>, <davem@...emloft.net>, <acme@...nel.org>,
<mingo@...hat.com>, <a.p.zijlstra@...llo.nl>,
<masami.hiramatsu.pt@...achi.com>, <jolsa@...nel.org>
CC: <lizefan@...nel.org>, <linux-kernel@...r.kernel.org>,
<pi3orama@....com>, <hekuang@...wei.com>
Subject: [RFC PATCH 20/22] perf bpf: clean elf memory after loading.
After all eBPF programs in an object file are loaded, related ELF
information is useless. Close the object file and free those memory.
Signed-off-by: Wang Nan <wangnan0@...wei.com>
---
tools/perf/util/bpf-loader.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
index 6587e99..208f5e8 100644
--- a/tools/perf/util/bpf-loader.c
+++ b/tools/perf/util/bpf-loader.c
@@ -944,6 +944,7 @@ int bpf__load(const char *path)
if ((err = bpf_obj_load_progs(obj)))
goto out;
+ bpf_obj_clear_elf(obj);
list_add(&obj->list, &bpf_obj_list);
return 0;
out:
--
1.8.3.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists