[peterz-queue:perf/wip.rewrite 5/5] kernel/events/core.c:846:17: error: continue statement not within a loop
From: kernel test robot
Date: Mon Aug 22 2022 - 16:42:15 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/wip.rewrite
head: 596b8cc92a97fa8defbff896dc9baedef441b983
commit: 596b8cc92a97fa8defbff896dc9baedef441b983 [5/5] Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20220823/202208230433.6XItjKD5-lkp@xxxxxxxxx/config)
compiler: mips-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=596b8cc92a97fa8defbff896dc9baedef441b983
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue perf/wip.rewrite
git checkout 596b8cc92a97fa8defbff896dc9baedef441b983
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash kernel/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
kernel/events/core.c: In function 'perf_cgroup_switch':
>> kernel/events/core.c:846:17: error: continue statement not within a loop
846 | continue;
| ^~~~~~~~
kernel/events/core.c:840:23: warning: unused variable 'flags' [-Wunused-variable]
840 | unsigned long flags;
| ^~~~~
kernel/events/core.c:839:27: warning: unused variable 'list' [-Wunused-variable]
839 | struct list_head *list;
| ^~~~
kernel/events/core.c: In function 'perf_rotate_context':
kernel/events/core.c:4220:36: warning: variable 'task_ctx' set but not used [-Wunused-but-set-variable]
4220 | struct perf_event_context *task_ctx = NULL;
| ^~~~~~~~
kernel/events/core.c: At top level:
kernel/events/core.c:4790:1: warning: no previous prototype for 'find_get_pmu_context' [-Wmissing-prototypes]
4790 | find_get_pmu_context(struct pmu *pmu, struct perf_event_context *ctx,
| ^~~~~~~~~~~~~~~~~~~~
kernel/events/core.c: In function 'perf_event_set_output':
kernel/events/core.c:12029:9: error: implicit declaration of function 'mutex_lock_double'; did you mean 'mutex_lock_killable'? [-Werror=implicit-function-declaration]
12029 | mutex_lock_double(&event->mmap_mutex, &output_event->mmap_mutex);
| ^~~~~~~~~~~~~~~~~
| mutex_lock_killable
cc1: some warnings being treated as errors
vim +846 kernel/events/core.c
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 831
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 832 /*
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 833 * reschedule events based on the cgroup constraint of task.
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 834 */
96492a6c558acb kernel/events/core.c Chengming Zhou 2022-03-29 835 static void perf_cgroup_switch(struct task_struct *task)
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 836 {
596b8cc92a97fa kernel/events/core.c Peter Zijlstra 2022-06-15 837 struct perf_cpu_context *cpuctx = this_cpu_ptr(&cpu_context);
96492a6c558acb kernel/events/core.c Chengming Zhou 2022-03-29 838 struct perf_cgroup *cgrp;
058fe1c0440e68 kernel/events/core.c David Carrillo-Cisneros 2017-01-18 839 struct list_head *list;
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 840 unsigned long flags;
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 841
96492a6c558acb kernel/events/core.c Chengming Zhou 2022-03-29 842 cgrp = perf_cgroup_from_task(task, NULL);
96492a6c558acb kernel/events/core.c Chengming Zhou 2022-03-29 843
058fe1c0440e68 kernel/events/core.c David Carrillo-Cisneros 2017-01-18 844 WARN_ON_ONCE(cpuctx->ctx.nr_cgroups == 0);
96492a6c558acb kernel/events/core.c Chengming Zhou 2022-03-29 845 if (READ_ONCE(cpuctx->cgrp) == cgrp)
96492a6c558acb kernel/events/core.c Chengming Zhou 2022-03-29 @846 continue;
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 847
facc43071cc0d4 kernel/events/core.c Peter Zijlstra 2011-04-09 848 perf_ctx_lock(cpuctx, cpuctx->task_ctx);
6a606214738273 kernel/events/core.c Peter Zijlstra 2022-01-13 849 perf_ctx_disable(&cpuctx->ctx);
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 850
6a606214738273 kernel/events/core.c Peter Zijlstra 2022-01-13 851 ctx_sched_out(&cpuctx->ctx, EVENT_ALL);
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 852 /*
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 853 * must not be done before ctxswout due
96492a6c558acb kernel/events/core.c Chengming Zhou 2022-03-29 854 * to update_cgrp_time_from_cpuctx() in
96492a6c558acb kernel/events/core.c Chengming Zhou 2022-03-29 855 * ctx_sched_out()
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 856 */
96492a6c558acb kernel/events/core.c Chengming Zhou 2022-03-29 857 cpuctx->cgrp = cgrp;
95cf59ea72331d kernel/events/core.c Peter Zijlstra 2012-10-02 858 /*
95cf59ea72331d kernel/events/core.c Peter Zijlstra 2012-10-02 859 * set cgrp before ctxsw in to allow
a0827713e298d0 kernel/events/core.c Chengming Zhou 2022-03-29 860 * perf_cgroup_set_timestamp() in ctx_sched_in()
a0827713e298d0 kernel/events/core.c Chengming Zhou 2022-03-29 861 * to not have to pass task around
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 862 */
6a606214738273 kernel/events/core.c Peter Zijlstra 2022-01-13 863 ctx_sched_in(&cpuctx->ctx, EVENT_ALL);
96492a6c558acb kernel/events/core.c Chengming Zhou 2022-03-29 864
6a606214738273 kernel/events/core.c Peter Zijlstra 2022-01-13 865 perf_ctx_enable(&cpuctx->ctx);
facc43071cc0d4 kernel/events/core.c Peter Zijlstra 2011-04-09 866 perf_ctx_unlock(cpuctx, cpuctx->task_ctx);
facc43071cc0d4 kernel/events/core.c Peter Zijlstra 2011-04-09 867 }
e5d1367f17ba6a kernel/perf_event.c Stephane Eranian 2011-02-14 868
:::::: The code at line 846 was first introduced by commit
:::::: 96492a6c558acb56124844d1409d9ef8624a0322 perf/core: Fix perf_cgroup_switch()
:::::: TO: Chengming Zhou <zhouchengming@xxxxxxxxxxxxx>
:::::: CC: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://01.org/lkp