Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752511AbdHIBQ5 (ORCPT ); Tue, 8 Aug 2017 21:16:57 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3035 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752272AbdHIBQ4 (ORCPT ); Tue, 8 Aug 2017 21:16:56 -0400 Subject: Re: [PATCH 2/2] sched/debug: intruduce task_state_to_char helper function To: kbuild test robot References: <201708081414.WwtEEHiJ%fengguang.wu@intel.com> CC: , , , , , From: Xie XiuQi Message-ID: <4345db75-e492-05d3-b6b2-f6be3bc367b6@huawei.com> Date: Wed, 9 Aug 2017 09:16:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <201708081414.WwtEEHiJ%fengguang.wu@intel.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.19.210] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.598A627B.0084,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 3ea62ab090948454866e399a22491060 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 12734 Lines: 273 Hi, I complied patch 2 incomplete, I'll fix it soon. -- Xie XiuQi On 2017/8/8 14:42, kbuild test robot wrote: > Hi Xie, > > [auto build test ERROR on tip/sched/core] > [also build test ERROR on v4.13-rc4 next-20170807] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://github.com/0day-ci/linux/commits/Xie-XiuQi/sched-debug-show-task-state-on-proc-sched_debug/20170808-135825 > config: i386-randconfig-x019-201732 (attached as .config) > compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 > reproduce: > # save the attached .config to linux build tree > make ARCH=i386 > > All errors (new ones prefixed by >>): > > kernel/sched/core.c: In function 'sched_show_task': >>> kernel/sched/core.c:5114:64: error: expected ')' before ';' token > printk(KERN_INFO "%-15.15s %c", p->comm, task_state_to_char(p); > ^ >>> kernel/sched/core.c:5133:1: error: expected ';' before '}' token > } > ^ > kernel/sched/core.c:5109:6: warning: unused variable 'ppid' [-Wunused-variable] > int ppid; > ^~~~ > kernel/sched/core.c:5108:16: warning: unused variable 'free' [-Wunused-variable] > unsigned long free = 0; > ^~~~ > In file included from arch/x86/include/asm/current.h:4:0, > from include/linux/sched.h:11, > from kernel/sched/core.c:8: > kernel/sched/core.c: At top level: > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'strcpy' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:390:2: note: in expansion of macro 'if' > if (p_size == (size_t)-1 && q_size == (size_t)-1) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:380:2: note: in expansion of macro 'if' > if (p_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:378:2: note: in expansion of macro 'if' > if (__builtin_constant_p(size) && p_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:369:2: note: in expansion of macro 'if' > if (p_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:367:2: note: in expansion of macro 'if' > if (__builtin_constant_p(size) && p_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:358:2: note: in expansion of macro 'if' > if (p_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:356:2: note: in expansion of macro 'if' > if (__builtin_constant_p(size) && p_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:348:2: note: in expansion of macro 'if' > if (p_size < size || q_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:345:3: note: in expansion of macro 'if' > if (q_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:343:3: note: in expansion of macro 'if' > -- > kernel/sched/debug.c: In function 'print_task': >>> kernel/sched/debug.c:432:24: error: implicit declaration of function 'task_sate_to_char' [-Werror=implicit-function-declaration] > SEQ_printf(m, " %c", task_sate_to_char(p)); > ^ > kernel/sched/debug.c:33:17: note: in definition of macro 'SEQ_printf' > seq_printf(m, x); \ > ^ > In file included from include/uapi/linux/stddef.h:1:0, > from include/linux/stddef.h:4, > from include/uapi/linux/posix_types.h:4, > from include/uapi/linux/types.h:13, > from include/linux/types.h:5, > from include/linux/proc_fs.h:7, > from kernel/sched/debug.c:13: > kernel/sched/debug.c: At top level: > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'strcpy' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:390:2: note: in expansion of macro 'if' > if (p_size == (size_t)-1 && q_size == (size_t)-1) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:380:2: note: in expansion of macro 'if' > if (p_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'kmemdup' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:378:2: note: in expansion of macro 'if' > if (__builtin_constant_p(size) && p_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:369:2: note: in expansion of macro 'if' > if (p_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr_inv' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:367:2: note: in expansion of macro 'if' > if (__builtin_constant_p(size) && p_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:358:2: note: in expansion of macro 'if' > if (p_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memchr' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:356:2: note: in expansion of macro 'if' > if (__builtin_constant_p(size) && p_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:348:2: note: in expansion of macro 'if' > if (p_size < size || q_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > include/linux/string.h:345:3: note: in expansion of macro 'if' > if (q_size < size) > ^~ > include/linux/compiler.h:162:4: warning: '______f' is static but declared in inline function 'memcmp' which is not static > ______f = { \ > ^ > include/linux/compiler.h:154:23: note: in expansion of macro '__trace_if' > #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) > ^~~~~~~~~~ > > vim +5114 kernel/sched/core.c > > 5105 > 5106 void sched_show_task(struct task_struct *p) > 5107 { > 5108 unsigned long free = 0; > 5109 int ppid; > 5110 > 5111 if (!try_get_task_stack(p)) > 5112 return; > 5113 >> 5114 printk(KERN_INFO "%-15.15s %c", p->comm, task_state_to_char(p); > 5115 > 5116 if (p->state == TASK_RUNNING) > 5117 printk(KERN_CONT " running task "); > 5118 #ifdef CONFIG_DEBUG_STACK_USAGE > 5119 free = stack_not_used(p); > 5120 #endif > 5121 ppid = 0; > 5122 rcu_read_lock(); > 5123 if (pid_alive(p)) > 5124 ppid = task_pid_nr(rcu_dereference(p->real_parent)); > 5125 rcu_read_unlock(); > 5126 printk(KERN_CONT "%5lu %5d %6d 0x%08lx\n", free, > 5127 task_pid_nr(p), ppid, > 5128 (unsigned long)task_thread_info(p)->flags); > 5129 > 5130 print_worker_info(KERN_INFO, p); > 5131 show_stack(p, NULL); > 5132 put_task_stack(p); >> 5133 } > 5134 > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/pipermail/kbuild-all Intel Corporation > -- Thanks, Xie XiuQi