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>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Clark <james.clark@linaro.org>,
	Collin Funk <collin.funk1@gmail.com>,
	Ravi Bangoria <ravi.bangoria@amd.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v1 1/2] perf test: Add an 'import perf' test shell script
Date: Wed, 1 Oct 2025 15:23:04 -0300	[thread overview]
Message-ID: <aN1xiDKUpNw83h8B@x1> (raw)
In-Reply-To: <CAP-5=fX46C2A22B1TBSgNb0BR1BumvqQeZvaFbU=9OqHmYPqrQ@mail.gmail.com>

On Wed, Oct 01, 2025 at 07:55:12AM -0700, Ian Rogers wrote:
> On Wed, Oct 1, 2025 at 6:42 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> >
> > On Tue, Sep 30, 2025 at 01:02:55PM -0700, Ian Rogers wrote:
> > > On Wed, Sep 3, 2025 at 11:42 AM Ian Rogers <irogers@google.com> wrote:
> > > >
> > > > The 'import perf' test needs to set up a path to the python module as
> > > > well as to know the python command to invoke. These are hard coded at
> > > > build time to be build a directory and the python used in the build,
> > > > which is less than desirable. Avoid the hard coded values by reusing
> > > > the existing shell script python setup and determine a potential built
> > > > python module via the path of the perf executable.
> > > >
> > > > Signed-off-by: Ian Rogers <irogers@google.com>
> > >
> > > Ping.
> >
> > There is another patch in this area to make it work, right?
> >
> > After applying this one I get a failure, only when I set PYTHONPATH it
> > works:
> >
> > ⬢ [acme@toolbx perf-tools-next]$ export PYTHONPATH=/tmp/build/perf-tools-next/python_ext_build/lib/
> > ⬢ [acme@toolbx perf-tools-next]$ perf test -v pytho
> > Couldn't bump rlimit(MEMLOCK), failures may take place when creating BPF maps, etc
> >  88: 'import perf' in python                                         : Ok
> > ⬢ [acme@toolbx perf-tools-next]$
> 
> Hmm.. if you are running from the install directory then I guess the
> assumption should be that the install bin directory is in the PATH,
> lib in LD_LIBRARY_PATH and PYTHONPATH set up for the directory too? We
> could have the script look for a python module going from ..../bin to
> ..../lib and fix the PYTHONPATH for you. Wdyyt?

I reported it more in the sense that something that was working before
stopped working but having not yet tried to see why it stopped working.

Another thing that I just noticed that may be related:

  35    97.47 fedora:rawhide                : Ok   gcc (GCC) 15.2.1 20250924 (Red Hat 15.2.1-2) , clang version 21.1.2 (Fedora 21.1.2-1.fc44) flex 2.6.4
  36    36.81 gentoo:stage3                 : Ok   gcc (Gentoo 13.3.1_p20240614 p17) 13.3.1 20240614  flex 2.6.4
  37    77.37 manjaro:base                  : FAIL clang version 16.0.6
      AR      /tmp/build/perf/libpmu-events.a
      LINK    /tmp/build/perf/perf
      GEN     /tmp/build/perf/python/perf.cpython-311-x86_64-linux-gnu.so
    /tmp/build/perf/python_ext_build/tmp/git/perf-6.17.0-rc6/tools/perf/util/python.o: file not recognized: file format not recognized
    clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command '/usr/sbin/clang' failed with exit code 1
    cp: cannot stat '/tmp/build/perf/python_ext_build/lib/perf*.so': No such file or directory
    make[2]: *** [Makefile.perf:747: /tmp/build/perf/python/perf.cpython-311-x86_64-linux-gnu.so] Error 1
    make[1]: *** [Makefile.perf:289: sub-make] Error 2
    make: *** [Makefile:76: all] Error 2
    make: Leaving directory '/git/perf-6.17.0-rc6/tools/perf'
    + exit 1
  38   130.27 opensuse:15.4                 : Ok   gcc (SUSE Linux) 7.5.0 , clang version 15.0.7 flex 2.6.4
  39   119.76 opensuse:15.5                 : Ok   gcc (SUSE Linux) 7.5.0 , clang version 15.0.7 flex 2.6.4
  40   120.03 opensuse:15.6                 : Ok   gcc (SUSE Linux) 7.5.0 , clang version 17.0.6 flex 2.6.4o

- Arnaldo

  reply	other threads:[~2025-10-01 18:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-03 18:42 [PATCH v1 1/2] perf test: Add an 'import perf' test shell script Ian Rogers
2025-09-03 18:42 ` [PATCH v1 2/2] perf test: Remove C python_use test Ian Rogers
2025-09-30 20:02 ` [PATCH v1 1/2] perf test: Add an 'import perf' test shell script Ian Rogers
2025-10-01 13:42   ` Arnaldo Carvalho de Melo
2025-10-01 13:44     ` Arnaldo Carvalho de Melo
2025-10-01 14:55     ` Ian Rogers
2025-10-01 18:23       ` Arnaldo Carvalho de Melo [this message]
2025-10-01 18:29         ` Ian Rogers
2025-09-30 23:10 ` Collin Funk

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=aN1xiDKUpNw83h8B@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=collin.funk1@gmail.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@amd.com \
    /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).