All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v2 1/2] perf/core: Share an event with multiple cgroups
Date: Tue, 13 Apr 2021 15:03:33 +0800	[thread overview]
Message-ID: <202104131425.m97OrSC1-lkp@intel.com> (raw)
In-Reply-To: <20210413044133.617921-2-namhyung@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 12333 bytes --]

Hi Namhyung,

I love your patch! Yet something to improve:

[auto build test ERROR on tip/perf/core]
[also build test ERROR on tip/master linux/master linus/master v5.12-rc7 next-20210412]
[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/Namhyung-Kim/perf-core-Sharing-events-with-multiple-cgroups/20210413-124251
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git cface0326a6c2ae5c8f47bd466f07624b3e348a7
config: arm64-randconfig-r026-20210413 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/c604a61fb3cfd58be50992c8284b13e598312794
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Namhyung-Kim/perf-core-Sharing-events-with-multiple-cgroups/20210413-124251
        git checkout c604a61fb3cfd58be50992c8284b13e598312794
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> kernel/events/core.c:3891:32: error: use of undeclared identifier 'cgroup_ctx_list'; did you mean 'cgroup_exit'?
           if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
                                         ^~~~~~~~~~~~~~~
                                         cgroup_exit
   include/linux/percpu-defs.h:252:39: note: expanded from macro 'this_cpu_ptr'
   #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                                         ^
   include/linux/percpu-defs.h:241:20: note: expanded from macro 'raw_cpu_ptr'
           __verify_pcpu_ptr(ptr);                                         \
                             ^
   include/linux/percpu-defs.h:219:47: note: expanded from macro '__verify_pcpu_ptr'
           const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL;    \
                                                        ^
   include/linux/cgroup.h:130:6: note: 'cgroup_exit' declared here
   void cgroup_exit(struct task_struct *p);
        ^
>> kernel/events/core.c:3891:32: error: use of undeclared identifier 'cgroup_ctx_list'; did you mean 'cgroup_exit'?
           if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
                                         ^~~~~~~~~~~~~~~
                                         cgroup_exit
   include/linux/percpu-defs.h:252:39: note: expanded from macro 'this_cpu_ptr'
   #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                                         ^
   include/linux/percpu-defs.h:242:19: note: expanded from macro 'raw_cpu_ptr'
           arch_raw_cpu_ptr(ptr);                                          \
                            ^
   include/asm-generic/percpu.h:44:48: note: expanded from macro 'arch_raw_cpu_ptr'
   #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
                                                  ^
   include/linux/percpu-defs.h:231:23: note: expanded from macro 'SHIFT_PERCPU_PTR'
           RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset))
                                ^
   include/linux/compiler.h:181:31: note: expanded from macro 'RELOC_HIDE'
        __ptr = (unsigned long) (ptr);                             \
                                 ^
   include/linux/cgroup.h:130:6: note: 'cgroup_exit' declared here
   void cgroup_exit(struct task_struct *p);
        ^
>> kernel/events/core.c:3891:32: error: use of undeclared identifier 'cgroup_ctx_list'; did you mean 'cgroup_exit'?
           if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
                                         ^~~~~~~~~~~~~~~
                                         cgroup_exit
   include/linux/percpu-defs.h:252:39: note: expanded from macro 'this_cpu_ptr'
   #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                                         ^
   include/linux/percpu-defs.h:242:19: note: expanded from macro 'raw_cpu_ptr'
           arch_raw_cpu_ptr(ptr);                                          \
                            ^
   include/asm-generic/percpu.h:44:48: note: expanded from macro 'arch_raw_cpu_ptr'
   #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
                                                  ^
   include/linux/percpu-defs.h:231:49: note: expanded from macro 'SHIFT_PERCPU_PTR'
           RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset))
                                                          ^
   include/linux/compiler.h:181:31: note: expanded from macro 'RELOC_HIDE'
        __ptr = (unsigned long) (ptr);                             \
                                 ^
   include/linux/cgroup.h:130:6: note: 'cgroup_exit' declared here
   void cgroup_exit(struct task_struct *p);
        ^
>> kernel/events/core.c:3891:32: error: use of undeclared identifier 'cgroup_ctx_list'; did you mean 'cgroup_exit'?
           if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
                                         ^~~~~~~~~~~~~~~
                                         cgroup_exit
   include/linux/percpu-defs.h:252:39: note: expanded from macro 'this_cpu_ptr'
   #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                                         ^
   include/linux/percpu-defs.h:242:19: note: expanded from macro 'raw_cpu_ptr'
           arch_raw_cpu_ptr(ptr);                                          \
                            ^
   include/asm-generic/percpu.h:44:48: note: expanded from macro 'arch_raw_cpu_ptr'
   #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
                                                  ^
   include/linux/percpu-defs.h:231:23: note: expanded from macro 'SHIFT_PERCPU_PTR'
           RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset))
                                ^
   include/linux/compiler.h:182:13: note: expanded from macro 'RELOC_HIDE'
       (typeof(ptr)) (__ptr + (off)); })
               ^
   include/linux/cgroup.h:130:6: note: 'cgroup_exit' declared here
   void cgroup_exit(struct task_struct *p);
        ^
>> kernel/events/core.c:3891:32: error: use of undeclared identifier 'cgroup_ctx_list'; did you mean 'cgroup_exit'?
           if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
                                         ^~~~~~~~~~~~~~~
                                         cgroup_exit
   include/linux/percpu-defs.h:252:39: note: expanded from macro 'this_cpu_ptr'
   #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                                         ^
   include/linux/percpu-defs.h:242:19: note: expanded from macro 'raw_cpu_ptr'
           arch_raw_cpu_ptr(ptr);                                          \
                            ^
   include/asm-generic/percpu.h:44:48: note: expanded from macro 'arch_raw_cpu_ptr'
   #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
                                                  ^
   include/linux/percpu-defs.h:231:49: note: expanded from macro 'SHIFT_PERCPU_PTR'
           RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset))
                                                          ^
   include/linux/compiler.h:182:13: note: expanded from macro 'RELOC_HIDE'
       (typeof(ptr)) (__ptr + (off)); })
               ^
   include/linux/cgroup.h:130:6: note: 'cgroup_exit' declared here
   void cgroup_exit(struct task_struct *p);
        ^
>> kernel/events/core.c:3891:18: error: incompatible pointer types passing 'typeof ((typeof (*(&cgroup_exit)) *)(&cgroup_exit))' (aka 'void (*)(struct task_struct *)') to parameter of type 'const struct list_head *' [-Werror,-Wincompatible-pointer-types]
           if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:252:27: note: expanded from macro 'this_cpu_ptr'
   #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                             ^~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:239:31: note: expanded from macro 'raw_cpu_ptr'
   #define raw_cpu_ptr(ptr)                                                \
                                                                           ^
   include/linux/list.h:280:54: note: passing argument to parameter 'head' here
   static inline int list_empty(const struct list_head *head)
                                                        ^
>> kernel/events/core.c:3892:6: error: implicit declaration of function 'perf_cgroup_from_task' [-Werror,-Wimplicit-function-declaration]
               perf_cgroup_from_task(task, NULL) !=
               ^
   kernel/events/core.c:3892:6: note: did you mean 'perf_cgroup_match'?
   kernel/events/core.c:1057:1: note: 'perf_cgroup_match' declared here
   perf_cgroup_match(struct perf_event *event)
   ^
>> kernel/events/core.c:5955:10: error: too many arguments to function call, expected 3, have 4
                                                      (char __user *)(arg + 16));
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/events/core.c:2437:19: note: 'perf_event_read_cgroup_node' declared here
   static inline int perf_event_read_cgroup_node(struct perf_event *event,
                     ^
   kernel/events/core.c:6981:6: warning: no previous prototype for function 'perf_pmu_snapshot_aux' [-Wmissing-prototypes]
   long perf_pmu_snapshot_aux(struct perf_buffer *rb,
        ^
   kernel/events/core.c:6981:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   long perf_pmu_snapshot_aux(struct perf_buffer *rb,
   ^
   static 
   1 warning and 8 errors generated.


vim +3891 kernel/events/core.c

  3851	
  3852	static void perf_event_switch(struct task_struct *task,
  3853				      struct task_struct *next_prev, bool sched_in);
  3854	
  3855	#define for_each_task_context_nr(ctxn)					\
  3856		for ((ctxn) = 0; (ctxn) < perf_nr_task_contexts; (ctxn)++)
  3857	
  3858	/*
  3859	 * Called from scheduler to remove the events of the current task,
  3860	 * with interrupts disabled.
  3861	 *
  3862	 * We stop each event and update the event value in event->count.
  3863	 *
  3864	 * This does not protect us against NMI, but disable()
  3865	 * sets the disabled bit in the control field of event _before_
  3866	 * accessing the event control register. If a NMI hits, then it will
  3867	 * not restart the event.
  3868	 */
  3869	void __perf_event_task_sched_out(struct task_struct *task,
  3870					 struct task_struct *next)
  3871	{
  3872		int ctxn;
  3873	
  3874		if (__this_cpu_read(perf_sched_cb_usages))
  3875			perf_pmu_sched_task(task, next, false);
  3876	
  3877		if (atomic_read(&nr_switch_events))
  3878			perf_event_switch(task, next, false);
  3879	
  3880		for_each_task_context_nr(ctxn)
  3881			perf_event_context_sched_out(task, ctxn, next);
  3882	
  3883		/*
  3884		 * if cgroup events exist on this CPU, then we need
  3885		 * to check if we have to switch out PMU state.
  3886		 * cgroup event are system-wide mode only
  3887		 */
  3888		if (atomic_read(this_cpu_ptr(&perf_cgroup_events)))
  3889			perf_cgroup_sched_out(task, next);
  3890	
> 3891		if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
> 3892		    perf_cgroup_from_task(task, NULL) !=
  3893		    perf_cgroup_from_task(next, NULL))
  3894			cgroup_node_sched_out(task);
  3895	}
  3896	

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35094 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	Ingo Molnar <mingo@kernel.org>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@redhat.com>, Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Stephane Eranian <eranian@google.com>,
	Andi Kleen <ak@linux.intel.com>, Ian Rogers <irogers@google.com>
Subject: Re: [PATCH v2 1/2] perf/core: Share an event with multiple cgroups
Date: Tue, 13 Apr 2021 15:03:33 +0800	[thread overview]
Message-ID: <202104131425.m97OrSC1-lkp@intel.com> (raw)
In-Reply-To: <20210413044133.617921-2-namhyung@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 12109 bytes --]

Hi Namhyung,

I love your patch! Yet something to improve:

[auto build test ERROR on tip/perf/core]
[also build test ERROR on tip/master linux/master linus/master v5.12-rc7 next-20210412]
[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/Namhyung-Kim/perf-core-Sharing-events-with-multiple-cgroups/20210413-124251
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git cface0326a6c2ae5c8f47bd466f07624b3e348a7
config: arm64-randconfig-r026-20210413 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/c604a61fb3cfd58be50992c8284b13e598312794
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Namhyung-Kim/perf-core-Sharing-events-with-multiple-cgroups/20210413-124251
        git checkout c604a61fb3cfd58be50992c8284b13e598312794
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> kernel/events/core.c:3891:32: error: use of undeclared identifier 'cgroup_ctx_list'; did you mean 'cgroup_exit'?
           if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
                                         ^~~~~~~~~~~~~~~
                                         cgroup_exit
   include/linux/percpu-defs.h:252:39: note: expanded from macro 'this_cpu_ptr'
   #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                                         ^
   include/linux/percpu-defs.h:241:20: note: expanded from macro 'raw_cpu_ptr'
           __verify_pcpu_ptr(ptr);                                         \
                             ^
   include/linux/percpu-defs.h:219:47: note: expanded from macro '__verify_pcpu_ptr'
           const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL;    \
                                                        ^
   include/linux/cgroup.h:130:6: note: 'cgroup_exit' declared here
   void cgroup_exit(struct task_struct *p);
        ^
>> kernel/events/core.c:3891:32: error: use of undeclared identifier 'cgroup_ctx_list'; did you mean 'cgroup_exit'?
           if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
                                         ^~~~~~~~~~~~~~~
                                         cgroup_exit
   include/linux/percpu-defs.h:252:39: note: expanded from macro 'this_cpu_ptr'
   #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                                         ^
   include/linux/percpu-defs.h:242:19: note: expanded from macro 'raw_cpu_ptr'
           arch_raw_cpu_ptr(ptr);                                          \
                            ^
   include/asm-generic/percpu.h:44:48: note: expanded from macro 'arch_raw_cpu_ptr'
   #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
                                                  ^
   include/linux/percpu-defs.h:231:23: note: expanded from macro 'SHIFT_PERCPU_PTR'
           RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset))
                                ^
   include/linux/compiler.h:181:31: note: expanded from macro 'RELOC_HIDE'
        __ptr = (unsigned long) (ptr);                             \
                                 ^
   include/linux/cgroup.h:130:6: note: 'cgroup_exit' declared here
   void cgroup_exit(struct task_struct *p);
        ^
>> kernel/events/core.c:3891:32: error: use of undeclared identifier 'cgroup_ctx_list'; did you mean 'cgroup_exit'?
           if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
                                         ^~~~~~~~~~~~~~~
                                         cgroup_exit
   include/linux/percpu-defs.h:252:39: note: expanded from macro 'this_cpu_ptr'
   #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                                         ^
   include/linux/percpu-defs.h:242:19: note: expanded from macro 'raw_cpu_ptr'
           arch_raw_cpu_ptr(ptr);                                          \
                            ^
   include/asm-generic/percpu.h:44:48: note: expanded from macro 'arch_raw_cpu_ptr'
   #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
                                                  ^
   include/linux/percpu-defs.h:231:49: note: expanded from macro 'SHIFT_PERCPU_PTR'
           RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset))
                                                          ^
   include/linux/compiler.h:181:31: note: expanded from macro 'RELOC_HIDE'
        __ptr = (unsigned long) (ptr);                             \
                                 ^
   include/linux/cgroup.h:130:6: note: 'cgroup_exit' declared here
   void cgroup_exit(struct task_struct *p);
        ^
>> kernel/events/core.c:3891:32: error: use of undeclared identifier 'cgroup_ctx_list'; did you mean 'cgroup_exit'?
           if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
                                         ^~~~~~~~~~~~~~~
                                         cgroup_exit
   include/linux/percpu-defs.h:252:39: note: expanded from macro 'this_cpu_ptr'
   #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                                         ^
   include/linux/percpu-defs.h:242:19: note: expanded from macro 'raw_cpu_ptr'
           arch_raw_cpu_ptr(ptr);                                          \
                            ^
   include/asm-generic/percpu.h:44:48: note: expanded from macro 'arch_raw_cpu_ptr'
   #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
                                                  ^
   include/linux/percpu-defs.h:231:23: note: expanded from macro 'SHIFT_PERCPU_PTR'
           RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset))
                                ^
   include/linux/compiler.h:182:13: note: expanded from macro 'RELOC_HIDE'
       (typeof(ptr)) (__ptr + (off)); })
               ^
   include/linux/cgroup.h:130:6: note: 'cgroup_exit' declared here
   void cgroup_exit(struct task_struct *p);
        ^
>> kernel/events/core.c:3891:32: error: use of undeclared identifier 'cgroup_ctx_list'; did you mean 'cgroup_exit'?
           if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
                                         ^~~~~~~~~~~~~~~
                                         cgroup_exit
   include/linux/percpu-defs.h:252:39: note: expanded from macro 'this_cpu_ptr'
   #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                                         ^
   include/linux/percpu-defs.h:242:19: note: expanded from macro 'raw_cpu_ptr'
           arch_raw_cpu_ptr(ptr);                                          \
                            ^
   include/asm-generic/percpu.h:44:48: note: expanded from macro 'arch_raw_cpu_ptr'
   #define arch_raw_cpu_ptr(ptr) SHIFT_PERCPU_PTR(ptr, __my_cpu_offset)
                                                  ^
   include/linux/percpu-defs.h:231:49: note: expanded from macro 'SHIFT_PERCPU_PTR'
           RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset))
                                                          ^
   include/linux/compiler.h:182:13: note: expanded from macro 'RELOC_HIDE'
       (typeof(ptr)) (__ptr + (off)); })
               ^
   include/linux/cgroup.h:130:6: note: 'cgroup_exit' declared here
   void cgroup_exit(struct task_struct *p);
        ^
>> kernel/events/core.c:3891:18: error: incompatible pointer types passing 'typeof ((typeof (*(&cgroup_exit)) *)(&cgroup_exit))' (aka 'void (*)(struct task_struct *)') to parameter of type 'const struct list_head *' [-Werror,-Wincompatible-pointer-types]
           if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:252:27: note: expanded from macro 'this_cpu_ptr'
   #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr)
                             ^~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:239:31: note: expanded from macro 'raw_cpu_ptr'
   #define raw_cpu_ptr(ptr)                                                \
                                                                           ^
   include/linux/list.h:280:54: note: passing argument to parameter 'head' here
   static inline int list_empty(const struct list_head *head)
                                                        ^
>> kernel/events/core.c:3892:6: error: implicit declaration of function 'perf_cgroup_from_task' [-Werror,-Wimplicit-function-declaration]
               perf_cgroup_from_task(task, NULL) !=
               ^
   kernel/events/core.c:3892:6: note: did you mean 'perf_cgroup_match'?
   kernel/events/core.c:1057:1: note: 'perf_cgroup_match' declared here
   perf_cgroup_match(struct perf_event *event)
   ^
>> kernel/events/core.c:5955:10: error: too many arguments to function call, expected 3, have 4
                                                      (char __user *)(arg + 16));
                                                      ^~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/events/core.c:2437:19: note: 'perf_event_read_cgroup_node' declared here
   static inline int perf_event_read_cgroup_node(struct perf_event *event,
                     ^
   kernel/events/core.c:6981:6: warning: no previous prototype for function 'perf_pmu_snapshot_aux' [-Wmissing-prototypes]
   long perf_pmu_snapshot_aux(struct perf_buffer *rb,
        ^
   kernel/events/core.c:6981:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   long perf_pmu_snapshot_aux(struct perf_buffer *rb,
   ^
   static 
   1 warning and 8 errors generated.


vim +3891 kernel/events/core.c

  3851	
  3852	static void perf_event_switch(struct task_struct *task,
  3853				      struct task_struct *next_prev, bool sched_in);
  3854	
  3855	#define for_each_task_context_nr(ctxn)					\
  3856		for ((ctxn) = 0; (ctxn) < perf_nr_task_contexts; (ctxn)++)
  3857	
  3858	/*
  3859	 * Called from scheduler to remove the events of the current task,
  3860	 * with interrupts disabled.
  3861	 *
  3862	 * We stop each event and update the event value in event->count.
  3863	 *
  3864	 * This does not protect us against NMI, but disable()
  3865	 * sets the disabled bit in the control field of event _before_
  3866	 * accessing the event control register. If a NMI hits, then it will
  3867	 * not restart the event.
  3868	 */
  3869	void __perf_event_task_sched_out(struct task_struct *task,
  3870					 struct task_struct *next)
  3871	{
  3872		int ctxn;
  3873	
  3874		if (__this_cpu_read(perf_sched_cb_usages))
  3875			perf_pmu_sched_task(task, next, false);
  3876	
  3877		if (atomic_read(&nr_switch_events))
  3878			perf_event_switch(task, next, false);
  3879	
  3880		for_each_task_context_nr(ctxn)
  3881			perf_event_context_sched_out(task, ctxn, next);
  3882	
  3883		/*
  3884		 * if cgroup events exist on this CPU, then we need
  3885		 * to check if we have to switch out PMU state.
  3886		 * cgroup event are system-wide mode only
  3887		 */
  3888		if (atomic_read(this_cpu_ptr(&perf_cgroup_events)))
  3889			perf_cgroup_sched_out(task, next);
  3890	
> 3891		if (!list_empty(this_cpu_ptr(&cgroup_ctx_list)) &&
> 3892		    perf_cgroup_from_task(task, NULL) !=
  3893		    perf_cgroup_from_task(next, NULL))
  3894			cgroup_node_sched_out(task);
  3895	}
  3896	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35094 bytes --]

  reply	other threads:[~2021-04-13  7:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13  4:41 [PATCH v2 0/2] perf core: Sharing events with multiple cgroups Namhyung Kim
2021-04-13  4:41 ` [PATCH v2 1/2] perf/core: Share an event " Namhyung Kim
2021-04-13  7:03   ` kernel test robot [this message]
2021-04-13  7:03     ` kernel test robot
2021-04-13  9:39   ` kernel test robot
2021-04-13  9:39     ` kernel test robot
2021-04-14  5:15   ` kernel test robot
2021-04-14  5:15     ` kernel test robot
2021-04-14  5:15   ` [PATCH] perf/core: fix memdup_user.cocci warnings kernel test robot
2021-04-14  5:15     ` kernel test robot
2021-04-13  4:41 ` [PATCH v2 2/2] perf/core: Support reading group events with shared cgroups Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202104131425.m97OrSC1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.