[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181105211844.GA15984@roeck-us.net>
Date: Mon, 5 Nov 2018 13:18:44 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Clark Williams <williams@...hat.com>,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Adrian Hunter <adrian.hunter@...el.com>,
David Ahern <dsahern@...il.com>, Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Wang Nan <wangnan0@...wei.com>
Subject: Re: [PATCH 19/28] perf beauty: Wire up the mmap flags table
generator to the Makefile
On Mon, Nov 05, 2018 at 04:13:56PM -0300, Arnaldo Carvalho de Melo wrote:
>
> I did the tests and it seems to work, its the same method used by the
> kernel sources, so I have this in place now:
>
> commit e2c39f36c354a06c6e9d32d4fdf8660b41803d82
> Author: Arnaldo Carvalho de Melo <acme@...hat.com>
> Date: Mon Nov 5 15:46:51 2018 -0300
>
> perf beauty: Use SRCARCH, ARCH=x86_64 must map to "x86" to find the headers
>
> Guenter reported that using ARCH=x86_64 to build perf has regressed:
>
> $ make -C tools/perf O=/tmp/build/perf ARCH=x86_64
> make: Entering directory '/home/acme/git/perf/tools/perf'
> BUILD: Doing 'make -j4' parallel build
> HOSTCC /tmp/build/perf/fixdep.o
> HOSTLD /tmp/build/perf/fixdep-in.o
> LINK /tmp/build/perf/fixdep
>
> Auto-detecting system features:
> ... dwarf: [ on ]
> <SNIP>
> ... bpf: [ on ]
>
> GEN /tmp/build/perf/common-cmds.h
> make[2]: *** No rule to make target '/home/acme/git/perf/tools/arch/x86_64/include/uapi/asm//mman.h', needed by '/tmp/build/perf/trace/beauty/generated/mmap_flags_array.c'. Stop.
> make[2]: *** Waiting for unfinished jobs....
> PERF_VERSION = 4.19.gf6c23e3
> make[1]: *** [Makefile.perf:207: sub-make] Error 2
> make: *** [Makefile:70: all] Error 2
> make: Leaving directory '/home/acme/git/perf/tools/perf'
> $
>
> This is because we must use $(SRCARCH) where we were using $(ARCH), so
> that, just like the top level Makefile, we get this done:
>
> # Additional ARCH settings for x86
> ifeq ($(ARCH),i386)
> SRCARCH := x86
> endif
> ifeq ($(ARCH),x86_64)
> SRCARCH := x86
> endif
>
> Which is done in tools/scripts/Makefile.arch, so switch to use
> $(SRCARCH).
>
> Reported-by: Guenter Roeck <linux@...ck-us.net>
> Cc: Adrian Hunter <adrian.hunter@...el.com>
> Cc: Clark Williams <williams@...hat.com>
> Cc: David Ahern <dsahern@...il.com>
> Cc: Jiri Olsa <jolsa@...nel.org>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Cc: Wang Nan <wangnan0@...wei.com>
> Fixes: fbd7458db757 ("perf beauty: Wire up the mmap flags table generator to the Makefile")
> Link: https://lkml.kernel.org/r/20181105184612.GD7077@kernel.org
> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
That seems to do the trick.
Tested-by: Guenter Roeck <linux@...ck-us.net>
>
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 3ccb4f0bf088..d95655489f7e 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -387,7 +387,7 @@ SHELL = $(SHELL_PATH)
>
> linux_uapi_dir := $(srctree)/tools/include/uapi/linux
> asm_generic_uapi_dir := $(srctree)/tools/include/uapi/asm-generic
> -arch_asm_uapi_dir := $(srctree)/tools/arch/$(ARCH)/include/uapi/asm/
> +arch_asm_uapi_dir := $(srctree)/tools/arch/$(SRCARCH)/include/uapi/asm/
>
> beauty_outdir := $(OUTPUT)trace/beauty/generated
> beauty_ioctl_outdir := $(beauty_outdir)/ioctl
Powered by blists - more mailing lists