linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andi Kleen <ak@linux.intel.com>, Ian Rogers <irogers@google.com>,
	Stephane Eranian <eranian@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Jin Yao <yao.jin@linux.intel.com>
Subject: Re: [PATCH v2 2/2] perf record: Add --synth option
Date: Tue, 10 Aug 2021 21:33:59 -0700	[thread overview]
Message-ID: <CAM9d7ci24NW9mn6FBOER_ut=AmgSB5x=8xD8Xhakt1Sxz+62vw@mail.gmail.com> (raw)
In-Reply-To: <YP61gJD91GwvfzwT@krava>

Hi Jiri,

On Mon, Jul 26, 2021 at 6:15 AM Jiri Olsa <jolsa@redhat.com> wrote:
>
> On Fri, Jul 23, 2021 at 09:01:29PM -0700, Namhyung Kim wrote:
> > Add an option to control synthesize behavior.
> >
> >     --synth <no|all|task|mmap|cgroup>
> >                       Fine-tune event synthesis: default=all
> >
> > This can be useful when we know it doesn't need some synthesis like
> > in a specific usecase and/or when using pipe:
> >
> >   $ perf record -a --all-cgroups --synth cgroup -o- sleep 1 | \
> >   > perf report -i- -s cgroup
> >
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> >  tools/perf/Documentation/perf-record.txt |  9 +++++
> >  tools/perf/builtin-record.c              | 48 +++++++++++++++++++-----
> >  tools/perf/util/record.h                 |  1 +
> >  tools/perf/util/synthetic-events.c       | 28 ++++++++++++++
> >  tools/perf/util/synthetic-events.h       | 12 ++++++
> >  5 files changed, 89 insertions(+), 9 deletions(-)
> >
> > diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
> > index d71bac847936..03a41bec0583 100644
> > --- a/tools/perf/Documentation/perf-record.txt
> > +++ b/tools/perf/Documentation/perf-record.txt
> > @@ -596,6 +596,15 @@ options.
> >  'perf record --dry-run -e' can act as a BPF script compiler if llvm.dump-obj
> >  in config file is set to true.
> >
> > +--synth=TYPE::
> > +Collect and synthesize given type of events (comma separated).
> > +Available types are:
> > +  'task'    - synthesize FORK and COMM events for each task
> > +  'mmap'    - synthesize MMAP events for each process (implies 'task')
> > +  'cgroup'  - synthesize CGROUP events for each cgroup
> > +  'all'     - synthesize all events (default)
> > +  'no'      - do not synthesize any of the above events
>
> this only affects events we take from proc right?

Right.

>
> should we perhaps mention it, because you'll get mmap
> events from kernel even if you specify --synth=task

Good point, will update.

Thanks,
Namhyung

      reply	other threads:[~2021-08-11  4:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-24  4:01 [PATCH v2 1/2] perf tools: Allow to control synthesize during record Namhyung Kim
2021-07-24  4:01 ` [PATCH v2 2/2] perf record: Add --synth option Namhyung Kim
2021-07-26 13:15   ` Jiri Olsa
2021-08-11  4:33     ` Namhyung Kim [this message]

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='CAM9d7ci24NW9mn6FBOER_ut=AmgSB5x=8xD8Xhakt1Sxz+62vw@mail.gmail.com' \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=yao.jin@linux.intel.com \
    --subject='Re: [PATCH v2 2/2] perf record: Add --synth option' \
    /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

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).