Re: [PATCH V3 4/6] x86/intel_rdt: Create required perf event attributes

From: kbuild test robot
Date: Wed Sep 12 2018 - 01:54:50 EST


Hi Reinette,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/x86/core]
[also build test ERROR on v4.19-rc3 next-20180911]
[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/Reinette-Chatre/perf-core-and-x86-intel_rdt-Fix-lack-of-coordination-with-perf/20180912-101526
config: i386-randconfig-x001-201836 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386

Note: the linux-review/Reinette-Chatre/perf-core-and-x86-intel_rdt-Fix-lack-of-coordination-with-perf/20180912-101526 HEAD b684b8727deb9e3cf635badb292b3314904d17b2 builds fine.
It only hurts bisectibility.

All error/warnings (new ones prefixed by >>):

>> arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:927:15: error: variable 'perf_miss_attr' has initializer but incomplete type
static struct perf_event_attr __attribute__((unused)) perf_miss_attr = {
^~~~~~~~~~~~~~~
>> arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:928:3: error: 'struct perf_event_attr' has no member named 'type'
.type = PERF_TYPE_RAW,
^~~~
>> arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:928:11: error: 'PERF_TYPE_RAW' undeclared here (not in a function); did you mean 'PIDTYPE_MAX'?
.type = PERF_TYPE_RAW,
^~~~~~~~~~~~~
PIDTYPE_MAX
>> arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:928:11: warning: excess elements in struct initializer
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:928:11: note: (near initialization for 'perf_miss_attr')
>> arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:929:3: error: 'struct perf_event_attr' has no member named 'size'
.size = sizeof(struct perf_event_attr),
^~~~
>> arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:929:18: error: invalid application of 'sizeof' to incomplete type 'struct perf_event_attr'
.size = sizeof(struct perf_event_attr),
^~~~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:929:11: warning: excess elements in struct initializer
.size = sizeof(struct perf_event_attr),
^~~~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:929:11: note: (near initialization for 'perf_miss_attr')
>> arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:930:3: error: 'struct perf_event_attr' has no member named 'pinned'
.pinned = 1,
^~~~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:930:13: warning: excess elements in struct initializer
.pinned = 1,
^
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:930:13: note: (near initialization for 'perf_miss_attr')
>> arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:931:3: error: 'struct perf_event_attr' has no member named 'disabled'
.disabled = 0,
^~~~~~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:931:14: warning: excess elements in struct initializer
.disabled = 0,
^
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:931:14: note: (near initialization for 'perf_miss_attr')
>> arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:932:3: error: 'struct perf_event_attr' has no member named 'exclude_user'
.exclude_user = 1,
^~~~~~~~~~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:932:18: warning: excess elements in struct initializer
.exclude_user = 1,
^
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:932:18: note: (near initialization for 'perf_miss_attr')
>> arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:935:15: error: variable 'perf_hit_attr' has initializer but incomplete type
static struct perf_event_attr __attribute__((unused)) perf_hit_attr = {
^~~~~~~~~~~~~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:936:3: error: 'struct perf_event_attr' has no member named 'type'
.type = PERF_TYPE_RAW,
^~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:936:11: warning: excess elements in struct initializer
.type = PERF_TYPE_RAW,
^~~~~~~~~~~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:936:11: note: (near initialization for 'perf_hit_attr')
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:937:3: error: 'struct perf_event_attr' has no member named 'size'
.size = sizeof(struct perf_event_attr),
^~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:937:18: error: invalid application of 'sizeof' to incomplete type 'struct perf_event_attr'
.size = sizeof(struct perf_event_attr),
^~~~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:937:11: warning: excess elements in struct initializer
.size = sizeof(struct perf_event_attr),
^~~~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:937:11: note: (near initialization for 'perf_hit_attr')
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:938:3: error: 'struct perf_event_attr' has no member named 'pinned'
.pinned = 1,
^~~~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:938:13: warning: excess elements in struct initializer
.pinned = 1,
^
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:938:13: note: (near initialization for 'perf_hit_attr')
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:939:3: error: 'struct perf_event_attr' has no member named 'disabled'
.disabled = 0,
^~~~~~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:939:14: warning: excess elements in struct initializer
.disabled = 0,
^
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:939:14: note: (near initialization for 'perf_hit_attr')
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:940:3: error: 'struct perf_event_attr' has no member named 'exclude_user'
.exclude_user = 1,
^~~~~~~~~~~~
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:940:18: warning: excess elements in struct initializer
.exclude_user = 1,
^
arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:940:18: note: (near initialization for 'perf_hit_attr')
>> arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:927:55: error: storage size of 'perf_miss_attr' isn't known
static struct perf_event_attr __attribute__((unused)) perf_miss_attr = {
^~~~~~~~~~~~~~
>> arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c:935:55: error: storage size of 'perf_hit_attr' isn't known
static struct perf_event_attr __attribute__((unused)) perf_hit_attr = {
^~~~~~~~~~~~~

vim +/perf_miss_attr +927 arch/x86//kernel/cpu/intel_rdt_pseudo_lock.c

917
918 /*
919 * Create a perf_event_attr for the hit and miss perf events that will
920 * be used during the performance measurement. A perf_event maintains
921 * a pointer to its perf_event_attr so a unique attribute structure is
922 * created for each perf_event.
923 *
924 * The actual configuration of the event is set right before use in order
925 * to use the X86_CONFIG macro.
926 */
> 927 static struct perf_event_attr __attribute__((unused)) perf_miss_attr = {
> 928 .type = PERF_TYPE_RAW,
> 929 .size = sizeof(struct perf_event_attr),
> 930 .pinned = 1,
> 931 .disabled = 0,
> 932 .exclude_user = 1,
933 };
934
> 935 static struct perf_event_attr __attribute__((unused)) perf_hit_attr = {
936 .type = PERF_TYPE_RAW,
937 .size = sizeof(struct perf_event_attr),
938 .pinned = 1,
> 939 .disabled = 0,
> 940 .exclude_user = 1,
941 };
942

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip