aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-10-22 16:09:15 -0700
committerAndrii Nakryiko <andrii@kernel.org>2021-10-22 16:09:15 -0700
commit59f2a29c04128a46df0031d4deb4c4b07c5edcea (patch)
treeb2c6ec554b4b21bb648bf273b9acbd215fc9f813 /tools/perf
parentlibbpf: Fix memory leak in btf__dedup() (diff)
parentselftests/bpf: Switch to new btf__type_cnt/btf__raw_data APIs (diff)
downloadwireguard-linux-59f2a29c04128a46df0031d4deb4c4b07c5edcea.tar.xz
wireguard-linux-59f2a29c04128a46df0031d4deb4c4b07c5edcea.zip
Merge branch 'libbpf: Add btf__type_cnt() and btf__raw_data() APIs'
Hengqi Chen says: ==================== Add btf__type_cnt() and btf__raw_data() APIs and deprecate btf__get_nr_type() and btf__get_raw_data() since the old APIs don't follow libbpf naming convention. Also update tools/selftests to use these new APIs. This is part of effort towards libbpf v1.0 v1->v2: - Update commit message, deprecate the old APIs in libbpf v0.7 (Andrii) - Separate changes in tools/ to individual patches (Andrii) ==================== Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to '')
-rw-r--r--tools/perf/util/bpf-event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/bpf-event.c b/tools/perf/util/bpf-event.c
index 1a7112a87736..388847bab6d9 100644
--- a/tools/perf/util/bpf-event.c
+++ b/tools/perf/util/bpf-event.c
@@ -110,7 +110,7 @@ static int perf_env__fetch_btf(struct perf_env *env,
u32 data_size;
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));
if (!node)