All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: irogers@google.com, Aditya Gupta <adityag@linux.ibm.com>,
	jolsa@kernel.org, linux-perf-users@vger.kernel.org,
	maddy@linux.ibm.com, atrajeev@linux.vnet.ibm.com,
	kjain@linux.ibm.com, disgoel@linux.vnet.ibm.com
Subject: Re: [PATCH v5 0/4] Introduce perf check subcommand
Date: Fri, 20 Oct 2023 17:21:48 -0300	[thread overview]
Message-ID: <ZTLhXEQ1DbeI4rk1@kernel.org> (raw)
In-Reply-To: <CAM9d7cghSKFMOCSNb0NYEAp6ts_gvxqg4_R4ppnXbzwrApuXSw@mail.gmail.com>

Em Wed, Oct 04, 2023 at 09:48:49PM -0700, Namhyung Kim escreveu:
> Arnaldo, Ian and others,
> 
> Are you ok with this?

Testing/reviewing it now.

- Arnaldo
 
> Thanks,
> Namhyung
> 
> 
> On Mon, Oct 2, 2023 at 10:54 PM Aditya Gupta <adityag@linux.ibm.com> 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@kernel.org/
> >
> > Introduce a subcommand "perf check --feature", with which
> > scripts can test for presence of a feature, such as:
> >
> >     perf check --feature HAVE_LIBTRACEEVENT
> >
> >     or
> >
> >     perf check --feature libtraceevent
> >
> > The usage of "perf version --build-options | grep" has been replaced in two
> > tests, with "perf check --feature" command
> >
> > Also, to not duplicate the same feature list at multiple places, a new global
> > 'supported_features' array has been introduced in builtin.h, so both commands
> > 'perf check --feature' and 'perf version --build-options' use the same array
> >
> > 'supported_features' feature is an array of 'struct feature_support', which
> > also has the name of the feature, macro used to test it's presence, and a
> > is_builtin member, which will be 0 if feature not built-in, and 1 if built-in
> >
> > Architectures Tested
> > ====================
> > * x86_64
> > * ppc64le
> >
> > Git tree
> > ========
> >
> > Git tree with this patch series applied for testing:
> > https://github.com/adi-g15-ibm/linux/tree/perf-check-feature-v5
> >
> > Changelog
> > =========
> > V5
> > + invert return value of 'has_support', but return value of perf check --feature
> > according to shell convention
> >
> > V4
> > + invert return value of perf check --feature
> >
> > V3
> > + simplified has_support code in builtin-check.c (patch #1)
> > + modified patch #3 and patch #4 according to change in return value in patch #1
> >
> > V2
> > + improved the patch series with suggestions from Namhyung
> > + fix incorrect return value, added -q option, and moved array definition to
> >   perf-check.c
> >
> > V1
> > + changed subcommand name to 'perf check --feature'
> > + added documentation for perf check
> > + support both macro (eg. HAVE_LIBTRACEEVENT), and name (eg. libtraceevent) as
> >   input to 'perf check --feature'
> > + change subject and descriptions of all patch mentioning perf check instead of
> >   perf build
> >
> > V0: Previous patch series: https://lore.kernel.org/linux-perf-users/20230825061125.24312-1-adityag@linux.ibm.com/
> >
> > Aditya Gupta (3):
> >   perf check: introduce check subcommand
> >   perf version: update --build-options to use 'supported_features' array
> >   perf tests task_analyzer: use perf check for libtraceevent support
> >
> > Athira Rajeev (1):
> >   tools/perf/tests: Update probe_vfs_getname.sh script to use perf check
> >     --feature
> >
> >  tools/perf/Build                              |   1 +
> >  tools/perf/Documentation/perf-check.txt       |  59 +++++++++
> >  tools/perf/builtin-check.c                    | 122 ++++++++++++++++++
> >  tools/perf/builtin-version.c                  |  39 ++----
> >  tools/perf/builtin.h                          |  18 +++
> >  tools/perf/perf.c                             |   1 +
> >  .../perf/tests/shell/lib/probe_vfs_getname.sh |   4 +-
> >  .../shell/record+probe_libc_inet_pton.sh      |   5 +-
> >  .../shell/record+script_probe_vfs_getname.sh  |   5 +-
> >  tools/perf/tests/shell/test_task_analyzer.sh  |   4 +-
> >  10 files changed, 221 insertions(+), 37 deletions(-)
> >  create mode 100644 tools/perf/Documentation/perf-check.txt
> >  create mode 100644 tools/perf/builtin-check.c
> >
> > --
> > 2.41.0
> >

-- 

- Arnaldo

  reply	other threads:[~2023-10-20 20:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03  5:54 [PATCH v5 0/4] Introduce perf check subcommand Aditya Gupta
2023-10-03  5:54 ` [PATCH v5 1/4] perf check: introduce " Aditya Gupta
2023-10-03  5:54 ` [PATCH v5 2/4] perf version: update --build-options to use 'supported_features' array Aditya Gupta
2023-10-03  5:54 ` [PATCH v5 3/4] perf tests task_analyzer: use perf check for libtraceevent support Aditya Gupta
2023-10-03  5:54 ` [PATCH v5 4/4] tools/perf/tests: Update probe_vfs_getname.sh script to use perf check --feature Aditya Gupta
2023-10-05  4:48 ` [PATCH v5 0/4] Introduce perf check subcommand Namhyung Kim
2023-10-20 20:21   ` Arnaldo Carvalho de Melo [this message]
2023-10-20 20:27   ` Arnaldo Carvalho de Melo
2023-10-21 12:11     ` Aditya Gupta

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=ZTLhXEQ1DbeI4rk1@kernel.org \
    --to=acme@kernel.org \
    --cc=adityag@linux.ibm.com \
    --cc=atrajeev@linux.vnet.ibm.com \
    --cc=disgoel@linux.vnet.ibm.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kjain@linux.ibm.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=maddy@linux.ibm.com \
    --cc=namhyung@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.