* [PATCH] tools/runqslower: Change state to __state
@ 2021-07-06 20:40 Jiri Olsa
2021-07-06 22:53 ` Song Liu
2021-07-07 16:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Jiri Olsa @ 2021-07-06 20:40 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
Cc: netdev, bpf, Martin KaFai Lau, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Peter Zijlstra
The task_struct state got renamed to __state, causing
compile fail:
runqslower.bpf.c:77:12: error: no member named 'state' in 'struct task_struct'
if (prev->state == TASK_RUNNING)
As this is tracing prog, I think we don't need to use
READ_ONCE to access __state.
Fixes: 2f064a59a11f ("sched: Change task_struct::state")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/bpf/runqslower/runqslower.bpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/bpf/runqslower/runqslower.bpf.c b/tools/bpf/runqslower/runqslower.bpf.c
index 645530ca7e98..ab9353f2fd46 100644
--- a/tools/bpf/runqslower/runqslower.bpf.c
+++ b/tools/bpf/runqslower/runqslower.bpf.c
@@ -74,7 +74,7 @@ int handle__sched_switch(u64 *ctx)
u32 pid;
/* ivcsw: treat like an enqueue event and store timestamp */
- if (prev->state == TASK_RUNNING)
+ if (prev->__state == TASK_RUNNING)
trace_enqueue(prev);
pid = next->pid;
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tools/runqslower: Change state to __state
2021-07-06 20:40 [PATCH] tools/runqslower: Change state to __state Jiri Olsa
@ 2021-07-06 22:53 ` Song Liu
2021-07-06 22:57 ` Song Liu
2021-07-07 16:20 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Song Liu @ 2021-07-06 22:53 UTC (permalink / raw)
To: Jiri Olsa
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Networking,
bpf, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Peter Zijlstra
On Tue, Jul 6, 2021 at 1:40 PM Jiri Olsa <jolsa@redhat.com> wrote:
>
> The task_struct state got renamed to __state, causing
> compile fail:
>
> runqslower.bpf.c:77:12: error: no member named 'state' in 'struct task_struct'
> if (prev->state == TASK_RUNNING)
>
> As this is tracing prog, I think we don't need to use
> READ_ONCE to access __state.
>
> Fixes: 2f064a59a11f ("sched: Change task_struct::state")
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tools/runqslower: Change state to __state
2021-07-06 22:53 ` Song Liu
@ 2021-07-06 22:57 ` Song Liu
0 siblings, 0 replies; 4+ messages in thread
From: Song Liu @ 2021-07-06 22:57 UTC (permalink / raw)
To: Jiri Olsa
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, Networking,
bpf, Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Peter Zijlstra
On Tue, Jul 6, 2021 at 3:53 PM Song Liu <song@kernel.org> wrote:
>
> On Tue, Jul 6, 2021 at 1:40 PM Jiri Olsa <jolsa@redhat.com> wrote:
> >
> > The task_struct state got renamed to __state, causing
> > compile fail:
> >
> > runqslower.bpf.c:77:12: error: no member named 'state' in 'struct task_struct'
> > if (prev->state == TASK_RUNNING)
> >
> > As this is tracing prog, I think we don't need to use
> > READ_ONCE to access __state.
> >
> > Fixes: 2f064a59a11f ("sched: Change task_struct::state")
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
>
> Acked-by: Song Liu <songliubraving@fb.com>
Just realized there is another thread fixing the same error.
Thanks,
Song
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tools/runqslower: Change state to __state
2021-07-06 20:40 [PATCH] tools/runqslower: Change state to __state Jiri Olsa
2021-07-06 22:53 ` Song Liu
@ 2021-07-07 16:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-07-07 16:20 UTC (permalink / raw)
To: Jiri Olsa
Cc: ast, daniel, andriin, netdev, bpf, kafai, songliubraving, yhs,
john.fastabend, kpsingh, peterz
Hello:
This patch was applied to bpf/bpf.git (refs/heads/master):
On Tue, 6 Jul 2021 22:40:05 +0200 you wrote:
> The task_struct state got renamed to __state, causing
> compile fail:
>
> runqslower.bpf.c:77:12: error: no member named 'state' in 'struct task_struct'
> if (prev->state == TASK_RUNNING)
>
> As this is tracing prog, I think we don't need to use
> READ_ONCE to access __state.
>
> [...]
Here is the summary with links:
- tools/runqslower: Change state to __state
https://git.kernel.org/bpf/bpf/c/cced7490b172
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-07 16:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 20:40 [PATCH] tools/runqslower: Change state to __state Jiri Olsa
2021-07-06 22:53 ` Song Liu
2021-07-06 22:57 ` Song Liu
2021-07-07 16:20 ` patchwork-bot+netdevbpf
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).