linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH] perf build: Fixes for LIBTRACEEVENT_DYNAMIC
Date: Mon, 5 Dec 2022 09:57:27 -0300	[thread overview]
Message-ID: <Y43qt8YRP1M8lTvP@kernel.org> (raw)
In-Reply-To: <20221129192924.1580537-1-irogers@google.com>

Em Tue, Nov 29, 2022 at 11:29:24AM -0800, Ian Rogers escreveu:
> If LIBTRACEEVENT_DYNAMIC is enabled then avoid the install step for
> the plugins. If disabled correct DESTDIR so that the plugins are
> installed under <lib>/traceevent/plugins.
> 
> Fixes: ef019df01e20 ("perf build: Install libtraceevent locally when building")
> Reported-by: Alexander Gordeev <agordeev@linux.ibm.com>
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/Makefile.perf | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index a17a6ea85e81..f4cd946fe91a 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -884,7 +884,7 @@ $(LIBTRACEEVENT_DYNAMIC_LIST): libtraceevent_plugins
>  
>  install-traceevent-plugins: libtraceevent_plugins
>  	$(Q)$(MAKE) -C $(LIBTRACEEVENT_PLUGINS_DIR) O=$(LIBTRACEEVENT_PLUGINS_OUTPUT) \
> -		DESTDIR=$(LIBTRACEEVENT_PLUGINS_DESTDIR) prefix= \
> +		DESTDIR=$(DESTDIR_SQ) prefix= \
>  		$(LIBTRACEEVENT_FLAGS) install
>  endif
>  
> @@ -1093,7 +1093,11 @@ install-tests: all install-gtk
>  		$(INSTALL) tests/shell/coresight/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/coresight'
>  	$(Q)$(MAKE) -C tests/shell/coresight install-tests
>  
> -install-bin: install-tools install-tests install-traceevent-plugins
> +install-bin: install-tools install-tests
> +
> +ifndef LIBTRACEEVENT_DYNAMIC
> +install-bin: install-traceevent-plugins
> +endif
>  
>  install: install-bin try-install-man

After applying this:

⬢[acme@toolbox perf]$ alias m
alias m='perf stat -e cycles:u,instructions:u make -k BUILD_BPF_SKEL=1 CORESIGHT=1 O=/tmp/build/perf -C tools/perf install-bin && git status && perf test python'
⬢[acme@toolbox perf]$

⬢[acme@toolbox perf]$ m
make: Entering directory '/var/home/acme/git/perf/tools/perf'
  BUILD:   Doing 'make -j32' parallel build
Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h'
diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/perf_regs.h' differs from latest version at 'arch/arm64/include/uapi/asm/perf_regs.h'
diff -u tools/arch/arm64/include/uapi/asm/perf_regs.h arch/arm64/include/uapi/asm/perf_regs.h
Warning: Kernel ABI header at 'tools/arch/arm64/include/asm/cputype.h' differs from latest version at 'arch/arm64/include/asm/cputype.h'
diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h
Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl'
diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl

  INSTALL libsubcmd_headers
  INSTALL traceevent_headers
  INSTALL libapi_headers
  INSTALL libperf_headers
  INSTALL libsymbol_headers
  INSTALL libbpf_headers
  CC      /tmp/build/perf/builtin-annotate.o
  CC      /tmp/build/perf/builtin-diff.o
  CC      /tmp/build/perf/builtin-evlist.o
  CC      /tmp/build/perf/builtin-sched.o
  CC      /tmp/build/perf/builtin-buildid-list.o
  CC      /tmp/build/perf/builtin-buildid-cache.o
  CC      /tmp/build/perf/builtin-record.o
  INSTALL trace_plugins
  GEN     /tmp/build/perf/python/perf.so
  CC      /tmp/build/perf/builtin-report.o
install: cannot create directory ‘/lib64/traceevent’: Permission denied
  CC      /tmp/build/perf/builtin-stat.o
install: cannot create regular file '/lib64/traceevent/plugins': No such file or directory
install: cannot create directory ‘/lib64/traceevent’: Permission denied
  CC      /tmp/build/perf/builtin-timechart.o
install: cannot create regular file '/lib64/traceevent/plugins': No such file or directory
install: cannot create directory ‘/lib64/traceevent’: Permission denied
  CC      /tmp/build/perf/builtin-top.o
install: cannot create regular file '/lib64/traceevent/plugins': No such file or directory
install: cannot create directory ‘/lib64/traceevent’: Permission denied
  CC      /tmp/build/perf/builtin-script.o
install: cannot create regular file '/lib64/traceevent/plugins': No such file or directory
install: cannot create directory ‘/lib64/traceevent’: Permission denied
  CC      /tmp/build/perf/builtin-kmem.o
install: cannot create regular file '/lib64/traceevent/plugins': No such file or directory
  CC      /tmp/build/perf/builtin-lock.o
install: cannot create directory ‘/lib64/traceevent’: Permission denied
  CC      /tmp/build/perf/builtin-kvm.o
install: cannot create regular file '/lib64/traceevent/plugins': No such file or directory
install: cannot create directory ‘/lib64/traceevent’: Permission denied
  CC      /tmp/build/perf/builtin-inject.o
install: cannot create regular file '/lib64/traceevent/plugins': No such file or directory
  CC      /tmp/build/perf/builtin-mem.o
install: cannot create directory ‘/lib64/traceevent’: Permission denied
install: cannot create regular file '/lib64/traceevent/plugins': No such file or directory
  CC      /tmp/build/perf/builtin-c2c.o
install: cannot create directory ‘/lib64/traceevent’: Permission denied
install: cannot create regular file '/lib64/traceevent/plugins': No such file or directory
  CC      /tmp/build/perf/builtin-kwork.o
install: cannot create directory ‘/lib64/traceevent’: Permission denied
  CC      /tmp/build/perf/builtin-trace.o
install: cannot create regular file '/lib64/traceevent/plugins': No such file or directory
install: cannot create directory ‘/lib64/traceevent’: Permission denied
install: cannot create regular file '/lib64/traceevent/plugins': No such file or directory
install: cannot create directory ‘/lib64/traceevent’: Permission denied
install: cannot create regular file '/lib64/traceevent/plugins': No such file or directory
make[3]: *** [Makefile:211: install] Error 1
make[2]: *** [Makefile.perf:886: install-traceevent-plugins] Error 2
make[2]: *** Waiting for unfinished jobs....
  CC      /tmp/build/perf/scripts/perl/Perf-Trace-Util/Context.o
  CC      /tmp/build/perf/scripts/python/Perf-Trace-Util/Context.o
  CC      /tmp/build/perf/bench/synthesize.o
  CC      /tmp/build/perf/bench/inject-buildid.o
  CC      /tmp/build/perf/ui/browsers/header.o
  CC      /tmp/build/perf/tests/evsel-tp-sched.o
  CC      /tmp/build/perf/arch/x86/util/intel-pt.o
  CC      /tmp/build/perf/arch/x86/util/intel-bts.o
  LD      /tmp/build/perf/scripts/python/Perf-Trace-Util/perf-in.o
  LD      /tmp/build/perf/bench/perf-in.o
  LD      /tmp/build/perf/ui/browsers/perf-in.o
  CC      /tmp/build/perf/tests/code-reading.o
  CC      /tmp/build/perf/tests/sample-parsing.o
  LD      /tmp/build/perf/arch/x86/util/perf-in.o
  CC      /tmp/build/perf/tests/topology.o
  LD      /tmp/build/perf/ui/perf-in.o
  CC      /tmp/build/perf/util/build-id.o
  CC      /tmp/build/perf/tests/time-utils-test.o
  CC      /tmp/build/perf/util/event.o
  CC      /tmp/build/perf/tests/demangle-java-test.o
  CC      /tmp/build/perf/tests/demangle-ocaml-test.o
  LD      /tmp/build/perf/arch/x86/perf-in.o
  CC      /tmp/build/perf/util/evsel.o
  CC      /tmp/build/perf/util/evsel_fprintf.o
  LD      /tmp/build/perf/arch/perf-in.o
  LD      /tmp/build/perf/tests/perf-in.o
  CC      /tmp/build/perf/util/header.o
  CC      /tmp/build/perf/util/session.o
  CC      /tmp/build/perf/util/s390-sample-raw.o
  CC      /tmp/build/perf/util/amd-sample-raw.o
  CC      /tmp/build/perf/util/ordered-events.o
  CC      /tmp/build/perf/util/thread.o
  CC      /tmp/build/perf/util/trace-event-parse.o
  CC      /tmp/build/perf/util/trace-event-read.o
  CC      /tmp/build/perf/util/trace-event-info.o
  CC      /tmp/build/perf/util/trace-event-scripting.o
  CC      /tmp/build/perf/util/trace-event.o
  CC      /tmp/build/perf/util/sort.o
  CC      /tmp/build/perf/util/hist.o
  CC      /tmp/build/perf/util/stat.o
  CC      /tmp/build/perf/util/synthetic-events.o
  CC      /tmp/build/perf/util/auxtrace.o
  CC      /tmp/build/perf/util/intel-pt.o
  CC      /tmp/build/perf/util/intel-bts.o
  CC      /tmp/build/perf/util/arm-spe.o
  CC      /tmp/build/perf/util/hisi-ptt.o
  CC      /tmp/build/perf/util/s390-cpumsf.o
  CC      /tmp/build/perf/util/scripting-engines/trace-event-perl.o
  CC      /tmp/build/perf/util/cs-etm.o
  CC      /tmp/build/perf/util/scripting-engines/trace-event-python.o
  CC      /tmp/build/perf/util/dlfilter.o
  CC      /tmp/build/perf/util/time-utils.o
  CC      /tmp/build/perf/util/bpf_off_cpu.o
  CC      /tmp/build/perf/util/probe-file.o
  CC      /tmp/build/perf/util/probe-event.o
  LD      /tmp/build/perf/util/scripting-engines/perf-in.o
  CC      /tmp/build/perf/util/unwind-libunwind-local.o
  CC      /tmp/build/perf/util/unwind-libunwind.o
  CC      /tmp/build/perf/util/data-convert-bt.o
  CC      /tmp/build/perf/util/data-convert-json.o
  LD      /tmp/build/perf/scripts/perl/Perf-Trace-Util/perf-in.o
  CC      /tmp/build/perf/util/jitdump.o
  LD      /tmp/build/perf/scripts/perf-in.o
  CC      /tmp/build/perf/util/bpf-event.o
  LD      /tmp/build/perf/util/perf-in.o
  LD      /tmp/build/perf/perf-in.o
make[1]: *** [Makefile.perf:240: sub-make] Error 2
make: *** [Makefile:113: install-bin] Error 2
make: Leaving directory '/var/home/acme/git/perf/tools/perf'

 Performance counter stats for 'make -k BUILD_BPF_SKEL=1 CORESIGHT=1 O=/tmp/build/perf -C tools/perf install-bin':

     9,363,188,016      cycles:u
    17,153,393,661      instructions:u                   #    1.83  insn per cycle

       2.837743632 seconds time elapsed

       2.316326000 seconds user
       2.136834000 seconds sys


⬢[acme@toolbox perf]$

  parent reply	other threads:[~2022-12-05 12:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 19:29 [PATCH] perf build: Fixes for LIBTRACEEVENT_DYNAMIC Ian Rogers
2022-12-01  9:41 ` Alexander Gordeev
2022-12-05 12:57 ` Arnaldo Carvalho de Melo [this message]
2022-12-05 22:44   ` Ian Rogers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y43qt8YRP1M8lTvP@kernel.org \
    --to=acme@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).