Skip to contentSkip to conversation

tools/runqslower: use __state instead of state

PATCH Superseded SanjayKumar J 2 participants 3 messages Jul 7, 2021 – Jul 14, 2021

Subsystems (3)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tools/runqslower: use __state instead of state

Commit 2f064a59a11f: sched: Change task_struct::state renamed task->state to task->__state in task_struct

---
 tools/bpf/runqslower/runqslower.bpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/bpf/runqslower/runqslower.bpf.c +1 -1
index 645530ca7e98..ab9353f2fd46 100644
@@ -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.32.0
#1 lore raw
Thank you for the patch! Yet something to improve:

Hi SanjayKumar,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]
[also build test ERROR on vhost/linux-next ipvs/master v5.14-rc1] [cannot apply to bpf/master next-20210712]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/SanjayKumar-J/tools-runqslower-use-__state-instead-of-state/20210707-131703
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/0e86dc86c0f18512dc19ba3d0b001b3f06338a0d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review SanjayKumar-J/tools-runqslower-use-__state-instead-of-state/20210707-131703 git checkout 0e86dc86c0f18512dc19ba3d0b001b3f06338a0d
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash -C tools/testing/selftests/bpf install

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

>> runqslower.bpf.c:77:12: error: no member named '__state' in 'struct task_struct'; did you mean 'state'?
           if (prev->__state == TASK_RUNNING)
                     ^~~~~~~
                     state
   /tools/vmlinux.h:1096:20: note: 'state' declared here
           volatile long int state;
                             ^

1 error generated.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#2 lore raw
Quoted 9 lines · kernel test robot

Hi SanjayKumar,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]
[also build test ERROR on vhost/linux-next ipvs/master v5.14-rc1] [cannot apply to bpf/master next-20210712]
[If your patch is applied to the wrong git tree, kindly drop us a note.

v4 version of the patch is already accepted in bpf tree commit-id:5616e895ecc56 and also in net tree ommit:5616e895ecc56

Quoted 33 lines

And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/SanjayKumar-J/tools-runqslower-use-__state-instead-of-state/20210707-131703
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/0e86dc86c0f18512dc19ba3d0b001b3f06338a0d
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review SanjayKumar-J/tools-runqslower-use-__state-instead-of-state/20210707-131703 git checkout 0e86dc86c0f18512dc19ba3d0b001b3f06338a0d
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash -C tools/testing/selftests/bpf install

If you fix the issue, kindly add following tag as appropriate

All errors (new ones prefixed by >>):

Quoted 1 line
Quoted 1 line

runqslower.bpf.c:77:12: error: no member named '__state' in 'struct task_struct'; did you mean 'state'?

           if (prev->__state == TASK_RUNNING)
                     ^~~~~~~
                     state
   /tools/vmlinux.h:1096:20: note: 'state' declared here
           volatile long int state;
                             ^

1 error generated.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]