All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Wang Nan <wangnan0@huawei.com>
Cc: acme@kernel.org, linux-kernel@vger.kernel.org, pi3orama@163.com,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH 5/6] perf ctf: Add '--all' option for 'perf data convert'
Date: Fri, 24 Jun 2016 09:07:36 +0200	[thread overview]
Message-ID: <20160624070736.GA10142@krava> (raw)
In-Reply-To: <1466673383-105778-6-git-send-email-wangnan0@huawei.com>

On Thu, Jun 23, 2016 at 09:16:22AM +0000, Wang Nan wrote:
> After this patch, 'perf data convert' convert comm events to output
> CTF stream.
> 
> Result:
> 
>  # perf record -a sleep 1
>  [ perf record: Woken up 1 times to write data ]
>  [ perf record: Captured and wrote 0.771 MB perf.data (79 samples) ]
> 
>  # perf data convert --to-ctf ./out.ctf
>  [ perf data convert: Converted 'perf.data' into CTF data './out.ctf' ]
>  [ perf data convert: Converted and wrote 0.004 MB (79 samples) ]
> 
>  # babeltrace ./out.ctf/
>  [20:59:41.942633169] (+?.?????????) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81065AF4, perf_tid = 0, perf_pid = 0, perf_period = 1 }
>  [20:59:41.942636194] (+0.000003025) cycles:ppp: { cpu_id = 0 }, { perf_ip = 0xFFFFFFFF81065AF4, perf_tid = 0, perf_pid = 0, perf_period = 1 }
>  ...    // only sample event is converted
> 
>  # perf data convert --all --to-ctf ./out.ctf
>  [ perf data convert: Converted 'perf.data' into CTF data './out.ctf' ]
>  [ perf data convert: Converted and wrote 0.004 MB (79 samples) ]
> 
>  # babeltrace ./out.ctf/
>  [00:00:00.000000000] (+?.?????????) perf_comm: { cpu_id = 0 }, { comm = "init", pid = 1, tid = 1 }
>  [00:00:00.000000000] (+0.000000000) perf_comm: { cpu_id = 0 }, { comm = "kthreadd", pid = 2, tid = 2 }
>  [00:00:00.000000000] (+0.000000000) perf_comm: { cpu_id = 0 }, { comm = "ksoftirqd/0", pid = 3, tid = 3 }
>  ...    // comm events are converted
> 
> Signed-off-by: Wang Nan <wangnan0@huawei.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Jiri Olsa <jolsa@redhat.com>
> ---
>  tools/perf/Documentation/perf-data.txt | 5 ++++-
>  tools/perf/builtin-data.c              | 1 +
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/Documentation/perf-data.txt b/tools/perf/Documentation/perf-data.txt
> index be8fa1a..f8ada39 100644
> --- a/tools/perf/Documentation/perf-data.txt
> +++ b/tools/perf/Documentation/perf-data.txt
> @@ -34,7 +34,10 @@ OPTIONS for 'convert'
>  --verbose::
>          Be more verbose (show counter open errors, etc).
>  
> -SEE ALSO
> +--all::
> +	Convert all events, including non-sample events (comm, fork, ...), to output.
> +	Default is off, only convert samples.

you removed the 'SEE ALSO' header ;-)

> +
>  --------
>  linkperf:perf[1]
>  [1] Common Trace Format - http://www.efficios.com/ctf
> diff --git a/tools/perf/builtin-data.c b/tools/perf/builtin-data.c
> index a011a56..a87c964 100644
> --- a/tools/perf/builtin-data.c
> +++ b/tools/perf/builtin-data.c
> @@ -65,6 +65,7 @@ static int cmd_data_convert(int argc, const char **argv,
>  		OPT_STRING(0, "to-ctf", &to_ctf, NULL, "Convert to CTF format"),
>  #endif
>  		OPT_BOOLEAN('f', "force", &opts.force, "don't complain, do it"),
> +		OPT_BOOLEAN(0, "all", &opts.non_sample, "Convert all events"),

IMO opts.all would suite better I think,
but we can always change it if needed

thanks,
jirka

  reply	other threads:[~2016-06-24  7:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23  9:16 [PATCH 0/6] perf ctf: Convert comm, fork and exit events to CTF Wang Nan
2016-06-23  9:16 ` [PATCH 1/6] perf ctf: Add value_set_string() helper Wang Nan
2016-06-23  9:16 ` [PATCH 2/6] perf ctf: Pass convert options through structure Wang Nan
2016-06-23  9:16 ` [PATCH 3/6] perf ctf: Add non_sample option Wang Nan
2016-06-23  9:16 ` [PATCH 4/6] perf ctf: Generate comm event to CTF output Wang Nan
2016-06-24  7:07   ` Jiri Olsa
2016-06-23  9:16 ` [PATCH 5/6] perf ctf: Add '--all' option for 'perf data convert' Wang Nan
2016-06-24  7:07   ` Jiri Olsa [this message]
2016-06-23  9:16 ` [PATCH 6/6] perf ctf: Generate fork and exit events to CTF output Wang Nan

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=20160624070736.GA10142@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pi3orama@163.com \
    --cc=wangnan0@huawei.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 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.