Skip to contentSkip to conversation

perf tools: Fix a typo in BTF tracepoint name

PATCH Applied Namhyung Kim 2 participants 2 messages Dec 8, 2022 – Dec 12, 2022

Subsystems (2)
lore
Share & tools
lore

Namhyung Kim

author maintainer
#0 lore raw

PATCH 1/1 perf tools: Fix a typo in BTF tracepoint name

In the BTF, tracepoint definitions have the prefix of "btf_trace_". The off-cpu profilier needs to check the signature of sched_switch event using the definition. But there's a typo (s/bpf/btf/) so it failed always.

Fixes b36888f71c85 ("perf record: Handle argument change in sched_switch")
---
 tools/perf/util/bpf_off_cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/bpf_off_cpu.c +1 -1
index c257813e674e..01f70b8e705a 100644
@@ -102,7 +102,7 @@ static void check_sched_switch_args(void)
 	const struct btf_type *t1, *t2, *t3;
 	u32 type_id;
 
-	type_id = btf__find_by_name_kind(btf, "bpf_trace_sched_switch",
+	type_id = btf__find_by_name_kind(btf, "btf_trace_sched_switch",
 					 BTF_KIND_TYPEDEF);
 	if ((s32)type_id < 0)
 		return;
Signature · 1 line
2.39.0.rc1.256.g54fd8350bd-goog
maintainer Applied
#1 lore raw

Em Thu, Dec 08, 2022 at 10:26:36AM -0800, Namhyung Kim escreveu:

Quoted 4 lines

In the BTF, tracepoint definitions have the prefix of "btf_trace_". The off-cpu profilier needs to check the signature of sched_switch event using the definition. But there's a typo (s/bpf/btf/) so it failed always.

Thanks, applied.

- Arnaldo

Quoted 21 lines
Fixes b36888f71c85 ("perf record: Handle argument change in sched_switch")
---
 tools/perf/util/bpf_off_cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/bpf_off_cpu.c +1 -1
index c257813e674e..01f70b8e705a 100644
@@ -102,7 +102,7 @@ static void check_sched_switch_args(void)
 	const struct btf_type *t1, *t2, *t3;
 	u32 type_id;
 
-	type_id = btf__find_by_name_kind(btf, "bpf_trace_sched_switch",
+	type_id = btf__find_by_name_kind(btf, "btf_trace_sched_switch",
 					 BTF_KIND_TYPEDEF);
 	if ((s32)type_id < 0)
 		return;
Signature · 1 line
2.39.0.rc1.256.g54fd8350bd-goog
Signature · 1 line
- Arnaldo