[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z8Ixn3J2hw8TLdRj@ghost>
Date: Fri, 28 Feb 2025 13:58:55 -0800
From: Charlie Jenkins <charlie@...osinc.com>
To: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Andi Kleen <ak@...ux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf tools: Fix perf object dir symbolic link
On Fri, Feb 28, 2025 at 01:48:32PM -0800, Charlie Jenkins wrote:
> The -n flag is needed as an argument to ln to avoid recursively setting
> the symbolic link when OUTPUT is the same as $(srctree)/tools/perf.
>
> Without this flag, the perf binary at $(srctree)/tools/perf/perf will
> become overwritten with a symbolic link to the parent directory.
>
> Additionally, remove the forward slash after $(OUTPUT) since $(OUTPUT)
> implicitly includes a forward slash.
>
> Signed-off-by: Charlie Jenkins <charlie@...osinc.com>
> Fixes: 890a1961c812 ("perf tools: Create source symlink in perf object dir")
I should have double checked that this patch didn't exist already, I see
there is another thread here:
https://lore.kernel.org/lkml/Z5aiWiqJbkNaVG2Y@google.com/T/
- Charlie
> ---
> tools/perf/Makefile.perf | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 55d6ce9ea52fb2a57b8632cc6d0ddc501e29cbfc..0b6f9de6f222da1181402aa33e41ec3b05f9189e 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -158,7 +158,7 @@ ifneq ($(OUTPUT),)
> VPATH += $(OUTPUT)
> export VPATH
> # create symlink to the original source
> -SOURCE := $(shell ln -sf $(srctree)/tools/perf $(OUTPUT)/source)
> +SOURCE := $(shell ln -sfn $(srctree)/tools/perf $(OUTPUT)source)
> endif
>
> # Beautify output
>
> ---
> base-commit: 0ad2507d5d93f39619fc42372c347d6006b64319
> change-id: 20250228-b4-fix_perf_symbolic_link-8cc373a195ac
> --
> - Charlie
>
Powered by blists - more mailing lists