diff mbox series

[bpf-next,2/5,v2] perf bpf: Switch to new btf__raw_data API

Message ID 20211022130623.1548429-3-hengqi.chen@gmail.com (mailing list archive)
State Accepted
Delegated to: BPF
Headers show
Series libbpf: Add btf__type_cnt() and btf__raw_data() APIs | expand

Checks

Context Check Description
netdev/cover_letter success Series has a cover letter
netdev/fixes_present success Fixes tag not required for -next series
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for bpf-next
netdev/subject_prefix success Link
netdev/cc_maintainers warning 12 maintainers not CCed: namhyung@kernel.org mark.rutland@arm.com netdev@vger.kernel.org jolsa@redhat.com alexander.shishkin@linux.intel.com acme@kernel.org mingo@redhat.com linux-perf-users@vger.kernel.org kpsingh@kernel.org peterz@infradead.org jackieliu2113@gmail.com quentin@isovalent.com
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success No Fixes tag
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success No static functions without inline keyword in header files
bpf/vmtest-bpf-next-PR success PR summary
bpf/vmtest-bpf-next success VM_Test

Commit Message

Hengqi Chen Oct. 22, 2021, 1:06 p.m. UTC
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: Hengqi Chen <hengqi.chen@gmail.com>
---
 tools/perf/util/bpf-event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.30.2
diff mbox series

Patch

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)