[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220813030822.GE74978@leoy-huanghe>
Date: Sat, 13 Aug 2022 11:08:22 +0800
From: Leo Yan <leo.yan@...aro.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org
Subject: Re: [PATCH 2/2] perf test: Introduce script for java symbol testing
On Fri, Aug 12, 2022 at 02:08:43PM -0700, Ian Rogers wrote:
[...]
> > > +if [ -e "$PWD/tools/perf/libperf-jvmti.so" ]; then
> > > + LIBJVMTI=$PWD/tools/perf/libperf-jvmti.so
> >
> >
> > Will this only work if we do a:
> >
> > make -C tools/perf
Yes, I think so.
> >
> > ?
>
> Perhaps, I'm not sure on the correct way to detect the install location.
> The only similar example I know of is:
> https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/tests/builtin-test.c?h=perf/core#n308
Yes, I refered the code in this link.
If user works under Linux source folder, the test will search lib in
the folder $LINUX or $LINUX/tools/perf; and it searchs the installed
libperf-jvmti.so in the folder "$PREFIX/lib64" or "$PREFIX/lib".
I think I can add a more path for searching system lib (e.g. the
libperf-jvmti.so is under /usr/lib/linux-tools-xxx/):
elif [ -e "/usr/lib/linux-tools-$(uname -a | awk '{ print $3 }' | sed -r 's/-generic//')/libperf-jvmti.so" ]; then
LIBJVMTI= /usr/lib/linux-tools-$(uname -a | awk '{ print $3 }' | sed -r 's/-generic//')/libperf-jvmti.so
> > +elif [ -e "$PWD/libperf-jvmti.so" ]; then
> > > + LIBJVMTI=$PWD/libperf-jvmti.so
> > > +elif [ -e "$PREFIX/lib64/libperf-jvmti.so" ]; then
> > > + LIBJVMTI=$PREFIX/lib64/libperf-jvmti.so
> > > +elif [ -e "$PREFIX/lib/libperf-jvmti.so" ]; then
> > > + LIBJVMTI=$PREFIX/lib/libperf-jvmti.so
> > > +else
> > > + echo "Fail to find libperf-jvmti.so"
> > > + exit 1
> >
>
> JVMTI is a build option so this should probably be "exit 2" for skip.
Sure, will fix.
Thanks,
Leo
Powered by blists - more mailing lists