linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Andi Kleen <ak@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH V3] perf scripts python: Add a script to run instances of perf script in parallel
Date: Wed, 24 Apr 2024 11:15:07 -0300	[thread overview]
Message-ID: <ZikT69GIsijZajoI@x1> (raw)
In-Reply-To: <ZihFYbdrnarNFWOd@tassilo>

On Tue, Apr 23, 2024 at 04:33:53PM -0700, Andi Kleen wrote:
> On Tue, Apr 23, 2024 at 04:32:48PM +0300, Adrian Hunter wrote:
> > Add a Python script to run a perf script command multiple times in
> > parallel, using perf script options --cpu and --time so that each job
> > processes a different chunk of the data.
> > 
> > Extend perf script tests to test also the new script.
> > 
> > The script supports the use of normal perf script options like
> >  --dlfilter and --script, so that the benefit of running parallel jobs
> > naturally extends to them also. In addition, a command can be provided
> > (refer --pipe-to option) to pipe standard output to a custom command.
> > 
> > Refer to the script's own help text at the end of the patch for more
> > details.
> > 
> > The script is useful for Intel PT traces, that can be efficiently
> > decoded by perf script when split by CPU and/or time ranges. Running
> > jobs in parallel can decrease the overall decoding time.
> > 
> > Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> 
> Reviewed-by: Andi Kleen <ak@linux.intel.com>

Thanks, applied, and added a note on testing it using:

      root@number:~# perf test -vv "perf script tests"
       97: perf script tests:
      <SNIP>
      Starting: perf script --cpu=27 -i /tmp/perf-test-script.T4MJDr0L6J/pp-perf.data
      Finished: perf script --cpu=25 -i /tmp/perf-test-script.T4MJDr0L6J/pp-perf.data
      Finished: perf script --cpu=26 -i /tmp/perf-test-script.T4MJDr0L6J/pp-perf.data
      Finished: perf script --cpu=27 -i /tmp/perf-test-script.T4MJDr0L6J/pp-perf.data
      There are 28 jobs: 27 completed, 1 running 
      Finished: perf script --cpu=24 -i /tmp/perf-test-script.T4MJDr0L6J/pp-perf.data
      There are 28 jobs: 28 completed, 0 running 
      All jobs finished successfully                      
      parallel-perf.py done
      parallel-perf test [Success]
      --- Cleaning up ---
      ---- end(0) ----
       97: perf script tests                                               : Ok
      root@number:~#

- Arnaldo

  reply	other threads:[~2024-04-24 14:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 13:32 [PATCH V3] perf scripts python: Add a script to run instances of perf script in parallel Adrian Hunter
2024-04-23 23:33 ` Andi Kleen
2024-04-24 14:15   ` Arnaldo Carvalho de Melo [this message]
2024-04-26 12:48     ` Arnaldo Carvalho de Melo
2024-04-26 15:24       ` Adrian Hunter
2024-04-26 20:34         ` Arnaldo Carvalho de Melo

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=ZikT69GIsijZajoI@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --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 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).