From: Arnaldo Carvalho de Melo Date: Fri, 16 Jun 2017 14:39:15 +0000 (-0300) Subject: tools: Adopt __aligned from kernel sources X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5c97cac63ac24c78c8126958a453774e49e706dd;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git tools: Adopt __aligned from kernel sources To have a more compact way to ask the compiler to use a specific alignment, making tools/ look more like kernel source code. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-8jiem6ubg9rlpbs7c2p900no@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/include/linux/compiler-gcc.h b/tools/include/linux/compiler-gcc.h index 0f57a48272ab..bd39b2090ad1 100644 --- a/tools/include/linux/compiler-gcc.h +++ b/tools/include/linux/compiler-gcc.h @@ -26,5 +26,6 @@ #define __noreturn __attribute__((noreturn)) +#define __aligned(x) __attribute__((aligned(x))) #define __printf(a, b) __attribute__((format(printf, a, b))) #define __scanf(a, b) __attribute__((format(scanf, a, b))) diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index 94cea4398a13..8d601fbdd8d6 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -1,6 +1,7 @@ #ifndef __PERF_EVLIST_H #define __PERF_EVLIST_H 1 +#include #include #include #include @@ -34,7 +35,7 @@ struct perf_mmap { refcount_t refcnt; u64 prev; struct auxtrace_mmap auxtrace_mmap; - char event_copy[PERF_SAMPLE_MAX_SIZE] __attribute__((aligned(8))); + char event_copy[PERF_SAMPLE_MAX_SIZE] __aligned(8); }; static inline size_t