linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf tools: Fix a typo in BTF tracepoint name
@ 2022-12-08 18:26 Namhyung Kim
  2022-12-12 15:42 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Namhyung Kim @ 2022-12-08 18:26 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: Ingo Molnar, Peter Zijlstra, LKML, Ian Rogers, Adrian Hunter,
	linux-perf-users, Song Liu, bpf

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")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/util/bpf_off_cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/bpf_off_cpu.c b/tools/perf/util/bpf_off_cpu.c
index c257813e674e..01f70b8e705a 100644
--- a/tools/perf/util/bpf_off_cpu.c
+++ b/tools/perf/util/bpf_off_cpu.c
@@ -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;
-- 
2.39.0.rc1.256.g54fd8350bd-goog


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

* Re: [PATCH] perf tools: Fix a typo in BTF tracepoint name
  2022-12-08 18:26 [PATCH] perf tools: Fix a typo in BTF tracepoint name Namhyung Kim
@ 2022-12-12 15:42 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-12-12 15:42 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Jiri Olsa, Ingo Molnar, Peter Zijlstra, LKML, Ian Rogers,
	Adrian Hunter, linux-perf-users, Song Liu, bpf

Em Thu, Dec 08, 2022 at 10:26:36AM -0800, Namhyung Kim escreveu:
> 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

 
> Fixes: b36888f71c85 ("perf record: Handle argument change in sched_switch")
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>  tools/perf/util/bpf_off_cpu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/bpf_off_cpu.c b/tools/perf/util/bpf_off_cpu.c
> index c257813e674e..01f70b8e705a 100644
> --- a/tools/perf/util/bpf_off_cpu.c
> +++ b/tools/perf/util/bpf_off_cpu.c
> @@ -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;
> -- 
> 2.39.0.rc1.256.g54fd8350bd-goog

-- 

- Arnaldo

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

end of thread, other threads:[~2022-12-12 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-08 18:26 [PATCH] perf tools: Fix a typo in BTF tracepoint name Namhyung Kim
2022-12-12 15:42 ` Arnaldo Carvalho de Melo

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).