tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/core
head: f2a10095dea5043022f47aea7e0c7bea6c696a13
commit: 9702d805bb8f2b491034828186758a1bc77fce84 [5/7] perf: Allow using AUX data in perf
samples
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.4.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 9702d805bb8f2b491034828186758a1bc77fce84
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sh
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/kernel.h:11:0,
from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/wait_bit.h:8,
from include/linux/fs.h:6,
from kernel//events/core.c:11:
kernel//events/core.c: In function 'perf_pmu_snapshot_aux':
> kernel//events/core.c:6299:13: error: 'rb' undeclared
(first use in this function); did you mean 'rq'?
WRITE_ONCE(rb->aux_in_sampling, 1);
^
include/linux/compiler.h:286:17: note: in definition of macro 'WRITE_ONCE'
union { typeof(x) __val; char __c[1]; } __u = \
^
kernel//events/core.c:6299:13: note: each undeclared identifier is reported only once
for each function it appears in
WRITE_ONCE(rb->aux_in_sampling, 1);
^
include/linux/compiler.h:286:17: note: in definition of macro 'WRITE_ONCE'
union { typeof(x) __val; char __c[1]; } __u = \
^
kernel//events/core.c: In function 'perf_event_create_kernel_counter':
kernel//events/core.c:11589:10: warning: return makes pointer from integer without a
cast [-Wint-conversion]
return -EINVAL;
^
vim +6299 kernel//events/core.c
6277
6278 long perf_pmu_snapshot_aux(struct perf_event *event,
6279 struct perf_output_handle *handle,
6280 unsigned long size)
6281 {
6282 unsigned long flags;
6283 long ret;
6284
6285 /*
6286 * Normal ->start()/->stop() callbacks run in IRQ mode in scheduler
6287 * paths. If we start calling them in NMI context, they may race with
6288 * the IRQ ones, that is, for example, re-starting an event that's just
6289 * been stopped, which is why we're using a separate callback that
6290 * doesn't change the event state.
6291 *
6292 * IRQs need to be disabled to prevent IPIs from racing with us.
6293 */
6294 local_irq_save(flags);
6295 /*
6296 * Guard against NMI hits inside the critical section;
6297 * see also perf_prepare_sample_aux().
6298 */
6299 WRITE_ONCE(rb->aux_in_sampling, 1);
6300 barrier();
6301
6302 ret = event->pmu->snapshot_aux(event, handle, size);
6303
6304 barrier();
6305 WRITE_ONCE(rb->aux_in_sampling, 0);
6306 local_irq_restore(flags);
6307
6308 return ret;
6309 }
6310
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation