Re: [PATCH v2 4/6] perf cpumap: Fix alignment for masks in event encoding

From: Alexander Gordeev
Date: Fri Aug 26 2022 - 08:58:51 EST


On Tue, Jun 14, 2022 at 07:33:51AM -0700, Ian Rogers wrote:

Hi Ian,

Although it is committed, still have a question.

> index e7758707cadd..d2d32589758a 100644
> --- a/tools/lib/perf/include/perf/event.h
> +++ b/tools/lib/perf/include/perf/event.h
> @@ -6,6 +6,7 @@
> #include <linux/types.h>
> #include <linux/limits.h>
> #include <linux/bpf.h>
> +#include <linux/compiler.h>

Is it correct approach to include it into user-exposed headers?
AFAICT headers_install.sh strips #include <linux/compiler.h> and
compiler*.h itself do not get installed with make headers_install.

[...]

> +struct __packed perf_record_cpu_map_data {

And it is only needed to pull __packed macro, right?

Thanks!