[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210706204005.92541-1-jolsa@kernel.org>
Date: Tue, 6 Jul 2021 22:40:05 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andriin@...com>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org,
Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...omium.org>,
Peter Zijlstra <peterz@...radead.org>
Subject: [PATCH] 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.
Fixes: 2f064a59a11f ("sched: Change task_struct::state")
Signed-off-by: Jiri Olsa <jolsa@...nel.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
Powered by blists - more mailing lists