[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190822152435.GD29569@kernel.org>
Date: Thu, 22 Aug 2019 12:24:35 -0300
From: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To: Gerald BAEZA <gerald.baeza@...com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
linux-kernel@...r.kernel.org,
Alexandre TORGUE <alexandre.torgue@...com>,
Andi Kleen <ak@...ux.intel.com>,
Mathieu Poirier <mathieu.poirier@...aro.org>
Subject: Re: [PATCH] libperf: fix alignment trap in perf stat
Em Thu, Aug 22, 2019 at 09:07:01AM +0000, Gerald BAEZA escreveu:
> Following the patch 'perf stat: Fix --no-scale', an
> alignment trap happens in process_counter_values()
> on ARMv7 platforms due to the attempt to copy non
> 64 bits aligned double words (pointed by 'count')
> via a NEON vectored instruction ('vld1' with 64
> bits alignment constraint).
>
> This patch sets a 64 bits alignment constraint on
> 'contents[]' field in 'struct xyarray' since the
> 'count' pointer used above points to such a
> structure.
You forgot to add Mathieu and Andi, which I just did.
I think this is ok and I'm applying, please holler anyone if think this
isn't the case,
- Arnaldo
> Signed-off-by: Gerald Baeza <gerald.baeza@...com>
> ---
> tools/perf/lib/include/internal/xyarray.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/lib/include/internal/xyarray.h b/tools/perf/lib/include/internal/xyarray.h
> index 3bf70e4..51e35d6 100644
> --- a/tools/perf/lib/include/internal/xyarray.h
> +++ b/tools/perf/lib/include/internal/xyarray.h
> @@ -2,6 +2,7 @@
> #ifndef __LIBPERF_INTERNAL_XYARRAY_H
> #define __LIBPERF_INTERNAL_XYARRAY_H
>
> +#include <linux/compiler.h>
> #include <sys/types.h>
>
> struct xyarray {
> @@ -10,7 +11,7 @@ struct xyarray {
> size_t entries;
> size_t max_x;
> size_t max_y;
> - char contents[];
> + char contents[] __aligned(8);
> };
>
> struct xyarray *xyarray__new(int xlen, int ylen, size_t entry_size);
> --
> 2.7.4
--
- Arnaldo
Powered by blists - more mailing lists