Re: [PATCH 0/4] Introduce perf build subcommand

From: Aditya Gupta
Date: Sun Sep 03 2023 - 07:54:23 EST


Hello Namhyung,

On Fri, Aug 25, 2023 at 10:07:28AM -0700, Namhyung Kim wrote:
> On Thu, Aug 24, 2023 at 11:11 PM Aditya Gupta <adityag@xxxxxxxxxxxxx> wrote:
> >
> > The Problem
> > ===========
> >
> > Currently the presence of a feature is checked with a combination of
> > perf version --build-options and greps, such as:
> >
> > perf version --build-options | grep " on .* HAVE_FEATURE"
> >
> > Proposed solution
> > =================
> >
> > As suggested by contributors in:
> > https://lore.kernel.org/linux-perf-users/ZMPWk5K63tadmDlU@xxxxxxxxxx/
> >
> > Introduce a subcommand "perf build --has", with which
> > scripts can test for presence of a feature, such as:
> >
> > perf build --has HAVE_FEATURE
> >
> > The usage of "perf version --build-options | grep" has been replaced in two
> > tests, with "perf build --has" command
>
> I'm not sure 'perf build' is a good name, it sounds like it needs to build
> something. Maybe 'perf check --feature XXX' ?
>
> Then we can extend the perf check command to *check* system
> settings like perf_event_paranoid, kptr_restrict, nmi_watchdog
> and so on, and possibly provides some advice or even change
> the values easily.
>
> What do you think?

Thanks for the suggestion, we agree with it.
I have sent the updated patch series, but it's again from V1 since the subcommand changed.

Patch series: https://lore.kernel.org/linux-perf-users/20230903114721.190733-1-adityag@xxxxxxxxxxxxx

Thanks,
Aditya Gupta