LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
	linux-kernel@vger.kernel.org,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Jeremie Galarneau <jgalar@efficios.com>,
	Namhyung Kim <namhyung@gmail.com>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Tom Zanussi <tzanussi@gmail.com>, Wang Nan <wangnan0@huawei.com>
Subject: Re: [PATCH 05/11] perf data: Add tracepoint events fields CTF conversion support
Date: Sun, 1 Mar 2015 14:20:43 +0100	[thread overview]
Message-ID: <20150301132043.GA17097@krava.redhat.com> (raw)
In-Reply-To: <20150225192344.GH18705@kernel.org>

On Wed, Feb 25, 2015 at 04:23:44PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, Feb 20, 2015 at 11:17:02PM +0100, Jiri Olsa escreveu:
> > From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> > Adding support to convert tracepoint event fields into CTF
> > event fields.
>  
> > We parse each tracepoint event for CTF conversion and add
> > tracepoint fields as regular CTF event fields, so they
> > appear in babeltrace output like:
>  
> >   $ babeltrace ./ctf-data/
> >   ...
> >   [09:02:00.950703057] (+?.?????????) sched:sched_stat_runtime: { }, { perf_ip = ... SNIP ... common_type = 298, common_flags = 1, \
> >   common_preempt_count = 0, common_pid = 31813, comm = "perf", pid = 31813, runtime = 458800, vruntime = 52059858071 }
> >   ...
> 
> Processed the previous patches, everything ok:
> 
> [acme@ssdandy linux]$ ls -la perf.data
> ls: cannot access perf.data: No such file or directory
> [acme@ssdandy linux]$ trace record usleep 1
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.029 MB perf.data (88 samples) ]
> [acme@ssdandy linux]$ ls -la perf.data
> -rw-------. 1 acme acme 5399896 Fev 25 16:19 perf.data
> [acme@ssdandy linux]$ perf evlist
> raw_syscalls:sys_enter
> raw_syscalls:sys_exit
> [acme@ssdandy linux]$ perf evlist -v
> raw_syscalls:sys_enter: sample_freq=1, type: 2, config: 75, size: 104, sample_type: IP|TID|TIME|ID|CPU|PERIOD|RAW, read_format: ID, disabled: 1, inherit: 1, mmap: 1, mmap2: 1, comm: 1, comm_exec: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1
> raw_syscalls:sys_exit: sample_freq=1, type: 2, config: 74, size: 104, sample_type: IP|TID|TIME|ID|CPU|PERIOD|RAW, read_format: ID, disabled: 1, inherit: 1, enable_on_exec: 1, sample_id_all: 1, exclude_guest: 1
> [acme@ssdandy linux]$ perf data convert --to-ctf=./ctf-data/
> [ perf data convert: Converted 'perf.data' into CTF data './ctf-data/' ]
> [ perf data convert: Converted and wrote 0.009 MB (88 samples) ]
> [acme@ssdandy linux]$ babeltrace ./ctf-data/
> [23:48:47.557933780] (+?.?????????) raw_syscalls:sys_exit: { }, { perf_ip = 0xFFFFFFFF81020FBA, perf_tid = 5093, perf_pid = 5093, perf_id = 1512, perf_cpu = 3, perf_period = 1 }
> [23:48:47.557957461] (+0.000023681) raw_syscalls:sys_enter: { }, { perf_ip = 0xFFFFFFFF81020EA6, perf_tid = 5093, perf_pid = 5093, perf_id = 1504, perf_cpu = 3, perf_period = 1 }
> [23:48:47.557958406] (+0.000000945) raw_syscalls:sys_exit: { }, { perf_ip = 0xFFFFFFFF81020FBA, perf_tid = 5093, perf_pid = 5093, perf_id = 1512, perf_cpu = 3, perf_period = 1 }
> [23:48:47.557973567] (+0.000015161) raw_syscalls:sys_enter: { }, { perf_ip = 0xFFFFFFFF81020EA6, perf_tid = 5093, perf_pid = 5093, perf_id = 1504, perf_cpu = 3, perf_period = 1 }
> [23:48:47.557976047] (+0.000002480) raw_syscalls:sys_exit: { }, { perf_ip = 0xFFFFFFFF81020FBA, perf_tid = 5093, perf_pid = 5093, perf_id = 1512, perf_cpu = 3, perf_period = 1 }
> [23:48:47.557985774] (+0.000009727) raw_syscalls:sys_enter: { }, { perf_ip = 0xFFFFFFFF81020EA6, perf_tid = 5093, perf_pid = 5093, perf_id = 1504, perf_cpu = 3, perf_period = 1 }
> [23:48:47.557990826] (+0.000005052) raw_syscalls:sys_exit: { }, { perf_ip = 0xFFFFFFFF81020FBA, perf_tid = 5093, perf_pid = 5093, perf_id = 1512, perf_cpu = 3, perf_period = 1 }
> <SNIP>
> 
> But then I apply this patch (convert tracepoint events fields into CTF event fields) and:
> 
> [acme@ssdandy linux]$ perf data convert --to-ctf=./ctf-data/
> [ perf data convert: Converted 'perf.data' into CTF data './ctf-data/' ]
> [ perf data convert: Converted and wrote 0.009 MB (88 samples) ]
> [acme@ssdandy linux]$ babeltrace ./ctf-data/
> [error] Packet size (18446744073709551615 bits) is larger than remaining file size (262144 bits).
> [error] Stream index creation error.
> [error] Open file stream error.
> [warning] [Context] Cannot open_trace of format ctf at path ./ctf-data.
> [warning] [Context] cannot open trace "./ctf-data" from ./ctf-data/ for reading.
> [error] Cannot open any trace for reading.
> 
> [error] opening trace "./ctf-data/" for reading.
> 
> [error] none of the specified trace paths could be opened.
> 
> [acme@ssdandy linux]$
> 
> It stops working.
> 
> [acme@ssdandy linux]$ ls -la ctf-data/
> total 44
> drwxrwx---.  2 acme acme    41 Fev 25 16:12 .
> drwxrwxr-x. 28 acme acme  4096 Fev 25 16:19 ..
> -rw-rw----.  1 acme acme  4666 Fev 25 16:21 metadata
> -rw-rw----.  1 acme acme 32768 Fev 25 16:21 perf_stream_0
> [acme@ssdandy linux]$
> 
> Can you try to reproduce this? The ctf-data/metadata file is below:

hum, i just tried and can't reproduce this one.. anychance of mixed
babeltrace installations? How did you install babeltrace sources?

I assume this was some standard Fedora latest something system right?

jirka


git HEAD:

[root@krava perf]# git log --oneline | head -3
9534f89 perf data: Add tracepoint events fields CTF conversion support
bb848d1 perf stat: Report unsupported events properly
ffdfa43 perf tools: Compare JOBS to 0 after grep

test:

[root@krava perf]# LD_LIBRARY_PATH=/opt/libbabeltrace/lib/ ./perf trace record usleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.023 MB perf.data (88 samples) ]
[root@krava perf]# LD_LIBRARY_PATH=/opt/libbabeltrace/lib/ ./perf data convert --to-ctf=./ctf-data
[ perf data convert: Converted 'perf.data' into CTF data './ctf-data' ]
[ perf data convert: Converted and wrote 0.009 MB (88 samples) ]
[root@krava perf]# babeltrace ./ctf-data/
[10:04:03.320544407] (+?.?????????) raw_syscalls:sys_exit: { }, { perf_ip = 0xFFFFFFFF810235AC, perf_tid = 23899, perf_pid = 23899, perf_id = 82, perf_cpu = 3, perf_period = 1, common_type = 75, common_flags = 0, common_preempt_count = 0, common_pid = 23899, id = 59, ret = 0 }
[10:04:03.320568054] (+0.000023647) raw_syscalls:sys_enter: { }, { perf_ip = 0xFFFFFFFF81023420, perf_tid = 23899, perf_pid = 23899, perf_id = 78, perf_cpu = 3, perf_period = 1, common_type = 76, common_flags = 0, common_preempt_count = 0, common_pid = 23899, id = 12, args = [ [0] = 0x0, [1] = 0x0, [2] = 0x0, [3] = 0x0, [4] = 0x37F, [5] = 0x64 ] }
[10:04:03.320568993] (+0.000000939) raw_syscalls:sys_exit: { }, { perf_ip = 0xFFFFFFFF810235AC, perf_tid = 23899, perf_pid = 23899, perf_id = 82, perf_cpu = 3, perf_period = 1, common_type = 75, common_flags = 0, common_preempt_count = 0, common_pid = 23899, id = 12, ret = 24440832 }
...


  reply	other threads:[~2015-03-01 13:21 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-20 22:16 [PATCHv5 00/11] perf tools: Add perf data CTF conversion Jiri Olsa
2015-02-20 22:16 ` [PATCH 01/11] perf tools: Add feature check for libbabeltrace Jiri Olsa
2015-02-26 11:35   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-02-28  9:25     ` Ingo Molnar
2015-02-28 12:28       ` Jiri Olsa
2015-02-20 22:16 ` [PATCH 02/11] perf tools: Add new perf data command Jiri Olsa
2015-02-26 11:36   ` [tip:perf/core] perf tools: Add new 'perf data' command tip-bot for Jiri Olsa
2015-02-20 22:17 ` [PATCH 03/11] perf data: Add perf data to CTF conversion support Jiri Olsa
2015-02-26 11:36   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-02-20 22:17 ` [PATCH 04/11] perf data: Add a 'perf' prefix to the generic fields Jiri Olsa
2015-02-26 11:36   ` [tip:perf/core] " tip-bot for Sebastian Andrzej Siewior
2015-02-20 22:17 ` [PATCH 05/11] perf data: Add tracepoint events fields CTF conversion support Jiri Olsa
2015-02-25 19:23   ` Arnaldo Carvalho de Melo
2015-03-01 13:20     ` Jiri Olsa [this message]
2015-03-02 15:32       ` Arnaldo Carvalho de Melo
2015-03-09 12:12         ` Jiri Olsa
2015-03-09 21:51           ` Arnaldo Carvalho de Melo
2015-03-09 23:11             ` Arnaldo Carvalho de Melo
2015-03-09 23:28               ` Arnaldo Carvalho de Melo
2015-03-10 12:00                 ` [PATCH] perf build: Fix libbabeltrace detection Jiri Olsa
2015-03-10 14:01                   ` Arnaldo Carvalho de Melo
2015-03-10 14:11                     ` Jiri Olsa
2015-03-10 14:44                       ` Jérémie Galarneau
2015-03-10 15:01                         ` Arnaldo Carvalho de Melo
2015-03-26  9:25                         ` Jiri Olsa
2015-03-26 15:05                           ` Arnaldo Carvalho de Melo
2015-03-10 15:03                       ` Arnaldo Carvalho de Melo
2015-03-10 16:04                       ` Arnaldo Carvalho de Melo
2015-03-11  8:45                         ` Jiri Olsa
2015-03-11 13:18                           ` Arnaldo Carvalho de Melo
2015-03-14  7:03                   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-03-14  7:07   ` [tip:perf/core] perf data: Add tracepoint events fields CTF conversion support tip-bot for Sebastian Andrzej Siewior
2015-02-20 22:17 ` [PATCH 06/11] perf data: Switch to multiple cpu stream files Jiri Olsa
2015-03-12 11:37   ` Wang Nan
2015-03-12 12:34     ` Jiri Olsa
2015-03-12 13:40       ` Wang Nan
2015-03-12 19:17         ` Arnaldo Carvalho de Melo
2015-03-12 19:59           ` Jérémie Galarneau
2015-03-13  6:02             ` Wang Nan
2015-03-13 16:46           ` Jérémie Galarneau
2015-02-20 22:17 ` [PATCH 07/11] perf data: Enable stream flush within processing Jiri Olsa
2015-02-20 22:17 ` [PATCH 08/11] perf data: Add support for setting ordered_events queue size Jiri Olsa
2015-02-20 22:17 ` [PATCH 09/11] tools lib traceevent: Add alias field to struct format_field Jiri Olsa
2015-02-24 22:54   ` Steven Rostedt
2015-02-24 23:12     ` Jiri Olsa
2015-02-20 22:17 ` [PATCH 10/11] perf data: Fix duplicate field names and avoid reserved keywords Jiri Olsa
2015-02-20 22:17 ` [PATCH 11/11] perf data: Fix signess of value Jiri Olsa
  -- strict thread matches above, loose matches on Subject: below --
2015-01-30 10:42 [PATCHv4 00/11] perf tools: Add perf data CTF conversion Jiri Olsa
2015-01-30 10:42 ` [PATCH 05/11] perf data: Add tracepoint events fields CTF conversion support Jiri Olsa

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=20150301132043.GA17097@krava.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@redhat.com \
    --cc=bigeasy@linutronix.de \
    --cc=dsahern@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=jgalar@efficios.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@gmail.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=tzanussi@gmail.com \
    --cc=wangnan0@huawei.com \
    --subject='Re: [PATCH 05/11] perf data: Add tracepoint events fields CTF conversion support' \
    /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).