Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] perf tools: Do not use deprecated bpf_program__title
@ 2020-09-07 11:02 Jiri Olsa
  2020-09-07 11:05 ` Jiri Olsa
  2020-09-08 20:11 ` Andrii Nakryiko
  0 siblings, 2 replies; 7+ messages in thread
From: Jiri Olsa @ 2020-09-07 11:02 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Arnaldo Carvalho de Melo
  Cc: netdev, bpf, Martin KaFai Lau, Song Liu, Yonghong Song,
	Andrii Nakryiko, John Fastabend, KP Singh,
	Jesper Dangaard Brouer

The bpf_program__title function got deprecated in libbpf,
use the suggested alternative.

Fixes: 521095842027 ("libbpf: Deprecate notion of BPF program "title" in favor of "section name"")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/bpf-loader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/bpf-loader.c b/tools/perf/util/bpf-loader.c
index 2feb751516ab..73de3973c8ec 100644
--- a/tools/perf/util/bpf-loader.c
+++ b/tools/perf/util/bpf-loader.c
@@ -328,7 +328,7 @@ config_bpf_program(struct bpf_program *prog)
 	probe_conf.no_inlines = false;
 	probe_conf.force_add = false;
 
-	config_str = bpf_program__title(prog, false);
+	config_str = bpf_program__section_name(prog);
 	if (IS_ERR(config_str)) {
 		pr_debug("bpf: unable to get title for program\n");
 		return PTR_ERR(config_str);
@@ -454,7 +454,7 @@ preproc_gen_prologue(struct bpf_program *prog, int n,
 	if (err) {
 		const char *title;
 
-		title = bpf_program__title(prog, false);
+		title = bpf_program__section_name(prog);
 		if (!title)
 			title = "[unknown]";
 
-- 
2.26.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-09  7:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-07 11:02 [PATCH] perf tools: Do not use deprecated bpf_program__title Jiri Olsa
2020-09-07 11:05 ` Jiri Olsa
2020-09-07 15:59   ` Tobias Klauser
2020-09-07 16:22     ` Jiri Olsa
2020-09-07 16:27       ` Tobias Klauser
2020-09-08 20:11 ` Andrii Nakryiko
2020-09-09  7:19   ` Jiri Olsa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).