提交 2502e74b 编写于 作者: H Hengqi Chen 提交者: Andrii Nakryiko

perf bpf: Switch to new btf__raw_data API

Replace the call to btf__get_raw_data with new API btf__raw_data.
The old APIs will be deprecated in libbpf v0.7+. No functionality
change.
Signed-off-by: NHengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: NAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211022130623.1548429-3-hengqi.chen@gmail.com
上级 6a886de0
...@@ -110,7 +110,7 @@ static int perf_env__fetch_btf(struct perf_env *env, ...@@ -110,7 +110,7 @@ static int perf_env__fetch_btf(struct perf_env *env,
u32 data_size; u32 data_size;
const void *data; const void *data;
data = btf__get_raw_data(btf, &data_size); data = btf__raw_data(btf, &data_size);
node = malloc(data_size + sizeof(struct btf_node)); node = malloc(data_size + sizeof(struct btf_node));
if (!node) if (!node)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册