[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9951ad2acd3d4454b39c4862da75d913@AcuMS.aculab.com>
Date: Wed, 15 Jun 2022 10:44:50 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Ian Rogers' <rogers.email@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
"Arnaldo Carvalho de Melo" <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
"Alexander Shishkin" <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
John Garry <john.garry@...wei.com>,
"Kan Liang" <kan.liang@...ux.intel.com>,
Andi Kleen <ak@...ux.intel.com>,
"Zhengjun Xing" <zhengjun.xing@...ux.intel.com>,
Felix Fietkau <nbd@....name>, Qi Liu <liuqi115@...wei.com>,
Like Xu <likexu@...cent.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>,
"Nick Forrington" <nick.forrington@....com>,
Kajol Jain <kjain@...ux.ibm.com>,
"James Clark" <james.clark@....com>,
Andrew Kilroy <andrew.kilroy@....com>,
"Paul A . Clarke" <pc@...ibm.com>, Will Deacon <will@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
"ananth.narayan@....com" <ananth.narayan@....com>,
"ravi.bangoria@....com" <ravi.bangoria@....com>,
"santosh.shukla@....com" <santosh.shukla@....com>,
"sandipan.das@....com" <sandipan.das@....com>,
Caleb Biggers <caleb.biggers@...el.com>,
Perry Taylor <perry.taylor@...el.com>,
Kshipra Bopardikar <kshipra.bopardikar@...el.com>
CC: Stephane Eranian <eranian@...gle.com>,
Ian Rogers <irogers@...gle.com>
Subject: RE: [PATCH v4 3/4] perf jevents: Switch build to use jevents.py
From: Ian Rogers
> Sent: 15 June 2022 04:05
>
> Generate pmu-events.c using jevents.py rather than the binary built from
> jevents.c. Add a new config variable NO_JEVENTS that is set when there
> is no architecture json or an appropriate python interpreter isn't present.
> When NO_JEVENTS is defined the file pmu-events/empty-pmu-events.c is copied
> and used as the pmu-events.c file.
>
...
> + # jevents.py uses f-strings present in Python 3.6 released in Dec. 2016.
> + JEVENTS_PYTHON_GOOD := $(shell $(PYTHON) -c 'import sys;print("1" if(sys.version_info.major >= 3
> and sys.version_info.minor >= 6) else "0")')
You probably want a "2>/dev/null" in there.
I also think I remember seeing a `which python` in one of these patches.
'which' is a bourne shell script that is trying to emulate a csh builtin.
It can't actually work, and ISTR one of the distros might be
trying to remove it.
In a traditional bourne shell you should use `type python`, the posix
equivalent (which any shell written in the last 30 years out to get
right) is `command -V python`.
Both type and command have to be shell builtins.
Although I suspect some shells get command -V wrong.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists