tools/runqslower: Change state to __state
Subsystems (3)
PATCH 1/1 tools/runqslower: Change state to __state
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.
--- tools/bpf/runqslower/runqslower.bpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/bpf/runqslower/runqslower.bpf.c +1 -1
@@ -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;
Signature · 1 line
2.31.1
Quoted 4 lines · Jiri Olsa
The
task_structstate got renamed to__state, causing compile fail:
Quoted 8 lines
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_ONCEto access__state.Fixes 2f064a59a11f ("sched: Change task_struct::state")Signed-off-by Jiri Olsa <[email protected]>
Song Liu
reviewerQuoted 9 lines · Song Liu
Quoted 7 lines · Jiri Olsa
The
task_structstate 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)
Quoted 7 lines
Quoted 5 lines
As this is tracing prog, I think we don't need to use
READ_ONCEto access__state.Fixes 2f064a59a11f ("sched: Change task_struct::state")Signed-off-by Jiri Olsa <[email protected]>Acked-by Song Liu <[email protected]>
Just realized there is another thread fixing the same error.
Thanks,
Song
This patch was applied to bpf/bpf.git (refs/heads/master):
Hello:
This patch was applied to bpf/bpf.git (refs/heads/master):
Quoted 10 lines · On Tue, 6 Jul 2021 22:40:05 +0200 you wrote:
The
task_structstate 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_ONCEto 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