diff options
author | Jiri Olsa <jolsa@redhat.com> | 2012-03-23 10:41:20 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-03-24 03:46:59 -0400 |
commit | b01c3a0010aabadf745f3e7fdb9cab682e0a28a2 (patch) | |
tree | de5fab4234ea646edbbac28f3d7dfb28f28bb601 /include/linux/perf_event.h | |
parent | 04a54d27ce9698d108d29c8a6a50c28f7446336b (diff) |
perf: Move mmap page data_head offset assertion out of header
Having the build time assertion in header is making the perf
build fail on x86 with:
../../include/linux/perf_event.h:411:32: error: variably modified \
‘__assert_mmap_data_head_offset’ at file scope [-Werror]
I'm moving the build time validation out of the header, because
I think it's better than to lessen the perf build warn/error
check.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: acme@redhat.com
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
Cc: cjashfor@linux.vnet.ibm.com
Cc: fweisbec@gmail.com
Link: http://lkml.kernel.org/r/1332513680-7870-1-git-send-email-jolsa@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r-- | include/linux/perf_event.h | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index ca9ed4e6a286..ddbb6a901f65 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -403,13 +403,6 @@ struct perf_event_mmap_page { | |||
403 | __u64 data_tail; /* user-space written tail */ | 403 | __u64 data_tail; /* user-space written tail */ |
404 | }; | 404 | }; |
405 | 405 | ||
406 | /* | ||
407 | * Build time assertion that we keep the data_head at the intended location. | ||
408 | * IOW, validation we got the __reserved[] size right. | ||
409 | */ | ||
410 | extern char __assert_mmap_data_head_offset | ||
411 | [1 - 2*!!(offsetof(struct perf_event_mmap_page, data_head) != 1024)]; | ||
412 | |||
413 | #define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) | 406 | #define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0) |
414 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) | 407 | #define PERF_RECORD_MISC_CPUMODE_UNKNOWN (0 << 0) |
415 | #define PERF_RECORD_MISC_KERNEL (1 << 0) | 408 | #define PERF_RECORD_MISC_KERNEL (1 << 0) |