From: David Laight <David.Laight@ACULAB.COM>
To: 'Ian Rogers' <rogers.email@gmail.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
"Arnaldo Carvalho de Melo" <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
John Garry <john.garry@huawei.com>,
"Kan Liang" <kan.liang@linux.intel.com>,
Andi Kleen <ak@linux.intel.com>,
"Zhengjun Xing" <zhengjun.xing@linux.intel.com>,
Felix Fietkau <nbd@nbd.name>, Qi Liu <liuqi115@huawei.com>,
Like Xu <likexu@tencent.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-perf-users@vger.kernel.org"
<linux-perf-users@vger.kernel.org>,
"Nick Forrington" <nick.forrington@arm.com>,
Kajol Jain <kjain@linux.ibm.com>,
"James Clark" <james.clark@arm.com>,
Andrew Kilroy <andrew.kilroy@arm.com>,
"Paul A . Clarke" <pc@us.ibm.com>, Will Deacon <will@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
"ananth.narayan@amd.com" <ananth.narayan@amd.com>,
"ravi.bangoria@amd.com" <ravi.bangoria@amd.com>,
"santosh.shukla@amd.com" <santosh.shukla@amd.com>,
"sandipan.das@amd.com" <sandipan.das@amd.com>,
Caleb Biggers <caleb.biggers@intel.com>,
Perry Taylor <perry.taylor@intel.com>,
Kshipra Bopardikar <kshipra.bopardikar@intel.com>
Cc: Stephane Eranian <eranian@google.com>, Ian Rogers <irogers@google.com>
Subject: RE: [PATCH v4 3/4] perf jevents: Switch build to use jevents.py
Date: Wed, 15 Jun 2022 10:44:50 +0000 [thread overview]
Message-ID: <9951ad2acd3d4454b39c4862da75d913@AcuMS.aculab.com> (raw)
In-Reply-To: <20220615030438.51477-4-irogers@google.com>
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)
next prev parent reply other threads:[~2022-06-15 10:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 3:04 [PATCH v4 0/4] Rewrite jevents program in python Ian Rogers
2022-06-15 3:04 ` [PATCH v4 1/4] perf python: Prefer python3 Ian Rogers
2022-06-15 3:04 ` [PATCH v4 2/4] perf jevents: Add python converter script Ian Rogers
2022-06-15 3:04 ` [PATCH v4 3/4] perf jevents: Switch build to use jevents.py Ian Rogers
2022-06-15 10:44 ` David Laight [this message]
2022-06-15 3:04 ` [PATCH v4 4/4] perf jevents: Remove jevents.c 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=9951ad2acd3d4454b39c4862da75d913@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=ananth.narayan@amd.com \
--cc=andrew.kilroy@arm.com \
--cc=caleb.biggers@intel.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=john.garry@huawei.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=kjain@linux.ibm.com \
--cc=kshipra.bopardikar@intel.com \
--cc=likexu@tencent.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=liuqi115@huawei.com \
--cc=mark.rutland@arm.com \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=nbd@nbd.name \
--cc=nick.forrington@arm.com \
--cc=pc@us.ibm.com \
--cc=perry.taylor@intel.com \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@amd.com \
--cc=rogers.email@gmail.com \
--cc=sandipan.das@amd.com \
--cc=santosh.shukla@amd.com \
--cc=will@kernel.org \
--cc=zhengjun.xing@linux.intel.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).